|
|
| ConeSDF ()=default |
| | Default constructor. Constructs a finite cone with its tip at the origin, height 1, and a 45-degree opening angle, body extending in the -y direction.
|
| |
| | ConeSDF (const Vec3T< T > &a_tip, const T &a_height, const T &a_angle) noexcept |
| | Full constructor.
|
| |
|
| ConeSDF (const ConeSDF &)=default |
| | Copy constructor.
|
| |
|
| ConeSDF (ConeSDF &&)=default |
| | Move constructor.
|
| |
| ConeSDF & | operator= (const ConeSDF &)=default |
| | Copy assignment.
|
| |
| ConeSDF & | operator= (ConeSDF &&)=default |
| | Move assignment.
|
| |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept |
| | Signed distance function for the finite cone.
|
| |
| BoundingVolumes::AABBT< T > | computeBoundingVolume () const noexcept |
| | The shape's axis-aligned bounding box.
|
| |
template<class T>
class EBGeometry::ConeSDF< T >
Signed distance field for a finite cone.
The cone tip is at m_tip and the body opens in the -y direction, so the base disc lies at m_tip + (0, -m_height, 0). The full opening angle a_angle is the tip-to-tip apex angle; internally the half-angle is encoded as m_c = (std::sin(half_angle), std::cos(half_angle)). The base radius equals m_height * std::tan(half_angle) = m_height * m_c[0] / m_c[1].
The SDF is negative inside the solid cone (including the base disc) and positive outside. By default the tip is at the origin, the height is 1, and the full opening angle is 45°, giving a base radius of std::tan(22.5°) ≈ 0.414.
- Template Parameters
-
| T | Floating-point precision. |