|
|
| CylinderSDF ()=default |
| | Default constructor. Constructs a unit cylinder of radius 1 and height 1, centered at the origin with its axis along y (cap centers at (0,-0.5,0) and (0,0.5,0)).
|
| |
| | CylinderSDF (const Vec3T< T > &a_center1, const Vec3T< T > &a_center2, const T &a_radius) |
| | Full constructor.
|
| |
|
| CylinderSDF (const CylinderSDF &)=default |
| | Copy constructor.
|
| |
|
| CylinderSDF (CylinderSDF &&)=default |
| | Move constructor.
|
| |
| CylinderSDF & | operator= (const CylinderSDF &)=default |
| | Copy assignment.
|
| |
| CylinderSDF & | operator= (CylinderSDF &&)=default |
| | Move assignment.
|
| |
| const Vec3T< T > & | getCenter1 () const noexcept |
| | Get one endpoint.
|
| |
| const Vec3T< T > & | getCenter2 () const noexcept |
| | Get the other endpoint.
|
| |
| const T & | getRadius () const noexcept |
| | Get radius.
|
| |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept |
| | Signed distance function for the cylinder.
|
| |
| 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 side, 1 the cap at the first center, 2 the cap at the second.
|
| |
| BoundingVolumes::AABBT< T > | computeBoundingVolume () const noexcept |
| | The shape's axis-aligned bounding box.
|
| |
|
|
Vec3T< T > | m_center1 = Vec3T<T>(T(0), T(-0.5), T(0)) |
| | One endpoint (cap center).
|
| |
|
Vec3T< T > | m_center2 = Vec3T<T>(T(0), T(0.5), T(0)) |
| | Other endpoint (cap center).
|
| |
|
Vec3T< T > | m_center = Vec3T<T>::zeros() |
| | Midpoint of m_center1 and m_center2.
|
| |
|
Vec3T< T > | m_axis = Vec3T<T>(T(0), T(1), T(0)) |
| | Unit axis pointing from m_center1 to m_center2.
|
| |
|
T | m_length = T(1) |
| | Distance between the two endpoints.
|
| |
|
T | m_radius = T(1) |
| | Cylinder radius.
|
| |
template<class T>
class EBGeometry::CylinderSDF< T >
Signed distance field for a finite, flat-capped cylinder.
The cylinder is defined by two cap-center positions m_center1 and m_center2 and a radius m_radius. The cylinder axis is the unit vector from m_center1 to m_center2, and its height (distance between the two flat caps) equals distance(m_center1, m_center2). The SDF is negative inside the cylinder and positive outside. By default the cylinder has radius 1 and height 1, centered at the origin with its axis along y (cap centers at (0,-0.5,0) and (0,0.5,0)).
- Template Parameters
-
| T | Floating-point precision. |