Signed distance field for a capped cone (a frustum): a cone cut flat at both ends, between two end centers, with a radius at each.
More...
|
|
| CappedConeSDF ()=default |
| | Default constructor. Constructs a frustum from (0,-0.5,0) with radius 1 to (0,0.5,0) with radius 0.5.
|
| |
| | CappedConeSDF (const Vec3T< T > &a_center1, const Vec3T< T > &a_center2, const T a_radius1, const T a_radius2) |
| | Full constructor.
|
| |
|
| CappedConeSDF (const CappedConeSDF &)=default |
| | Copy constructor.
|
| |
|
| CappedConeSDF (CappedConeSDF &&)=default |
| | Move constructor.
|
| |
| CappedConeSDF & | operator= (const CappedConeSDF &)=default |
| | Copy assignment.
|
| |
| CappedConeSDF & | operator= (CappedConeSDF &&)=default |
| | Move assignment.
|
| |
| const Vec3T< T > & | getCenter1 () const noexcept |
| | Get the center of one end.
|
| |
| const Vec3T< T > & | getCenter2 () const noexcept |
| | Get the center of the other end.
|
| |
| const T & | getRadius1 () const noexcept |
| | Get the radius at m_center1.
|
| |
| const T & | getRadius2 () const noexcept |
| | Get the radius at m_center2.
|
| |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept |
| | Signed distance function for the frustum.
|
| |
| uint32_t | getNumParts () const noexcept |
| | How many parts the shape has (see hasParts): 3.
|
| |
| uint32_t | closestPart (const Vec3T< T > &a_point) const noexcept |
| | The part whose term decides the value at a point (see hasParts): 0 the slanted side, 1 the end disc at the first center, 2 the one at the second.
|
| |
| BoundingVolumes::AABBT< T > | computeBoundingVolume () const noexcept |
| | The shape's axis-aligned bounding box.
|
| |
template<class T>
class EBGeometry::CappedConeSDF< T >
Signed distance field for a capped cone (a frustum): a cone cut flat at both ends, between two end centers, with a radius at each.
One radius may be zero, which makes a cone with its tip at that end, pointing anywhere (ConeSDF points along y). The distance is exact (Quilez's capped cone): in the plane through the axis, the nearer of the distances to the end discs and to the slanted side. By default the frustum runs from (0,-0.5,0) with radius 1 to (0,0.5,0) with radius 0.5.
- Template Parameters
-
| T | Floating-point precision. |