|
|
| CylinderSDF ()=default |
| | Default constructor. Constructs a unit cylinder of radius 1 and height 1, centred at the origin with its axis along y (cap centres 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) noexcept |
| | 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.
|
| |
|
| ~CylinderSDF () override=default |
| | Destructor.
|
| |
| 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 override |
| | Signed distance function for the cylinder.
|
| |
|
| SignedDistanceFunction ()=default |
| | Default constructor.
|
| |
|
| ~SignedDistanceFunction () override=default |
| | Destructor.
|
| |
| T | value (const Vec3T< T > &a_point) const noexcept final |
| | Implementation of ImplicitFunction::value; delegates to signedDistance().
|
| |
| virtual Vec3T< T > | normal (const Vec3T< T > &a_point, const T &a_delta) const noexcept |
| | Compute the outward normal using central finite differences.
|
| |
|
| ImplicitFunction ()=default |
| | Default constructor.
|
| |
|
virtual | ~ImplicitFunction ()=default |
| | Default destructor.
|
| |
| T | operator() (const Vec3T< T > &a_point) const noexcept |
| | Call operator — alternative signature for the value function.
|
| |
| template<class BV > |
| BV | approximateBoundingVolumeOctree (const Vec3T< T > &a_initialLowCorner, const Vec3T< T > &a_initialHighCorner, const unsigned int a_maxTreeDepth, const T &a_safety=0.0) const |
| | Compute an approximation to the bounding volume for the implicit surface using octree subdivision.
|
| |
|
|
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-centre 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, centred at the origin with its axis along y (cap centres at (0,-0.5,0) and (0,0.5,0)).
- Template Parameters
-
| T | Floating-point precision. |