|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Signed distance field for an infinite cone. More...
#include <EBGeometry_AnalyticDistanceFunctions.hpp>


Public Member Functions | |
| InfiniteConeSDF ()=default | |
| Default constructor. Constructs an infinite cone with tip at the origin, 45° full opening angle, and body extending in the -z direction. | |
| InfiniteConeSDF (const Vec3T< T > &a_tip, const T &a_angle) noexcept | |
| Full constructor. | |
| InfiniteConeSDF (const InfiniteConeSDF &)=default | |
| Copy constructor. | |
| InfiniteConeSDF (InfiniteConeSDF &&)=default | |
| Move constructor. | |
| InfiniteConeSDF & | operator= (const InfiniteConeSDF &)=default |
| Copy assignment. | |
| InfiniteConeSDF & | operator= (InfiniteConeSDF &&)=default |
| Move assignment. | |
| ~InfiniteConeSDF () override=default | |
| Destructor. | |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept override |
| Signed distance function for the infinite cone. | |
Public Member Functions inherited from EBGeometry::SignedDistanceFunction< T > | |
| 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. | |
Public Member Functions inherited from EBGeometry::ImplicitFunction< T > | |
| 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. | |
Protected Attributes | |
| Vec3T< T > | m_tip = Vec3T<T>::zeros() |
| Tip position. | |
| Vec2T< T > | m_c = Vec2T<T>(std::sin(pi<T> / T(8)), std::cos(pi<T> / T(8))) |
| (sin, cos) of the half opening-angle. Default: 45° full angle → half-angle 22.5°. | |
Signed distance field for an infinite cone.
The cone tip is at m_tip. The cone body opens in the -z direction from the tip (the interior, where SDF < 0, is the solid region extending downward along -z within the cone surface). The full opening angle a_angle (tip-to-tip across the cone) is halved internally; the half-angle is stored as m_c = (std::sin(half_angle), std::cos(half_angle)).
For a 45° full opening angle the half-angle is 22.5°; a point directly below the tip at depth d sits on the cone surface when its radial distance from the axis equals d * std::tan(half_angle).
The cone is infinite: it has no base plane. By default the tip is at the origin and the full opening angle is 45°, with the body extending along -z.
| T | Floating-point precision. |
|
inlinenoexcept |
Full constructor.
| [in] | a_tip | Cone tip position. |
| [in] | a_angle | Full opening angle in degrees (must be in (0°, 180°)). The half-angle a_angle / 2 is used internally and encoded as m_c = (sin, cos) of that half-angle. |
|
default |
Copy assignment.
|
default |
Move assignment.
|
inlineoverridevirtualnoexcept |
Signed distance function for the infinite cone.
| [in] | a_point | Position. |
Implements EBGeometry::SignedDistanceFunction< T >.