|
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 -y 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. | |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept |
| Signed distance function for the infinite cone. | |
| BoundingVolumes::AABBT< T > | computeBoundingVolume () const noexcept |
| The shape's axis-aligned bounding box. | |
Static Public Attributes | |
| static constexpr DistanceQuality | distanceQuality = DistanceQuality::Exact |
| How far signedDistance() can be trusted as a distance: the Euclidean distance to the surface. | |
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 -y direction from the tip (the interior, where SDF < 0, is the solid region extending downward along -y 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 -y.
| 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. |
|
inlinenoexcept |
The shape's axis-aligned bounding box.
Bounded above by the tip in y, and unbounded below it and in x and z.
|
default |
Copy assignment.
|
default |
Move assignment.
|
inlinenoexcept |
Signed distance function for the infinite cone.
| [in] | a_point | Position. |