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


Public Member Functions | |
| SphereSDF ()=default | |
| Default constructor. Constructs a unit sphere centered at the origin. | |
| SphereSDF (const Vec3T< T > &a_center, const T &a_radius) noexcept | |
| Full constructor. | |
| SphereSDF (const SphereSDF &)=default | |
| Copy constructor. | |
| SphereSDF (SphereSDF &&)=default | |
| Move constructor. | |
| SphereSDF & | operator= (const SphereSDF &)=default |
| Copy assignment. | |
| SphereSDF & | operator= (SphereSDF &&)=default |
| Move assignment. | |
| ~SphereSDF () override=default | |
| Destructor. | |
| const Vec3T< T > & | getCenter () const noexcept |
| Get sphere center (const). | |
| Vec3T< T > & | getCenter () noexcept |
| Get sphere center (mutable). | |
| const T & | getRadius () const noexcept |
| Get sphere radius (const). | |
| T & | getRadius () noexcept |
| Get sphere radius (mutable). | |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept override |
| Signed distance function for the sphere. | |
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_center = Vec3T<T>::zeros() |
| Sphere center. | |
| T | m_radius = T(1) |
| Sphere radius. | |
Signed distance field for a sphere.
The sphere is placed at m_center with radius m_radius. The SDF is negative inside the sphere and positive outside. By default the sphere is centered at the origin with radius 1.
| T | Floating-point precision. |
|
inlinenoexcept |
Full constructor.
| [in] | a_center | Sphere center. |
| [in] | a_radius | Sphere radius. |
|
inlinenoexcept |
Get sphere center (const).
|
inlinenoexcept |
Get sphere center (mutable).
|
inlinenoexcept |
Get sphere radius (const).
|
inlinenoexcept |
Get sphere radius (mutable).
|
default |
Copy assignment.
|
default |
Move assignment.
|
inlineoverridevirtualnoexcept |
Signed distance function for the sphere.
| [in] | a_point | Position. |
Implements EBGeometry::SignedDistanceFunction< T >.