Signed distance field for a capped torus: an arc of a torus with flat ends, such as a pipe elbow.
More...
|
|
| CappedTorusSDF ()=default |
| | Default constructor. Constructs an arc of 90 degrees, centered at the origin, with major radius 1 and minor radius 0.25.
|
| |
| | CappedTorusSDF (const Vec3T< T > &a_center, const T a_majorRadius, const T a_minorRadius, const T a_angle) |
| | Full constructor.
|
| |
|
| CappedTorusSDF (const CappedTorusSDF &)=default |
| | Copy constructor.
|
| |
|
| CappedTorusSDF (CappedTorusSDF &&)=default |
| | Move constructor.
|
| |
| CappedTorusSDF & | operator= (const CappedTorusSDF &)=default |
| | Copy assignment.
|
| |
| CappedTorusSDF & | operator= (CappedTorusSDF &&)=default |
| | Move assignment.
|
| |
| const Vec3T< T > & | getCenter () const noexcept |
| | Get the center.
|
| |
| const T & | getMajorRadius () const noexcept |
| | Get the major (ring) radius.
|
| |
| const T & | getMinorRadius () const noexcept |
| | Get the minor (tube) radius.
|
| |
| const T & | getAngle () const noexcept |
| | Get the angle the arc sweeps, in degrees.
|
| |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept |
| | Signed distance function for the capped torus.
|
| |
| 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 tube, 1 the end disc at the positive angle, 2 the one at the negative; a whole torus is all tube.
|
| |
| BoundingVolumes::AABBT< T > | computeBoundingVolume () const noexcept |
| | The shape's axis-aligned bounding box.
|
| |
template<class T>
class EBGeometry::CappedTorusSDF< T >
Signed distance field for a capped torus: an arc of a torus with flat ends, such as a pipe elbow.
The torus' ring lies in the xz-plane around an axis along y through the center, like TorusSDF's. The arc sweeps the given angle, symmetric about +x, and each end is the disc where the tube is cut by the half-plane through the axis at that angle. The distance is exact. Inside the arc's angle, the nearest point of the solid is that of the whole torus, unless the point is inside and an end disc is nearer. Outside the angle, it is on an end disc: any point of the solid turned around the axis toward the point stays in the solid, and is nearer, until it reaches an end. An angle of 360 degrees is the whole torus. By default the arc sweeps 90 degrees, with major radius 1 and minor radius 0.25.
- Template Parameters
-
| T | Floating-point precision. |