|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Signed distance field for a revolved vesica: a lens between two tips, the vesica (the overlap of two discs) in a plane through the tips, turned around the line through them. More...
#include <EBGeometry_AnalyticDistanceFunctions.hpp>
Public Member Functions | |
| VesicaSDF ()=default | |
| Default constructor. Constructs a vesica from (0,-1,0) to (0,1,0), with radius 0.5. | |
| VesicaSDF (const Vec3T< T > &a_tip1, const Vec3T< T > &a_tip2, const T a_radius) | |
| Full constructor. | |
| VesicaSDF (const VesicaSDF &)=default | |
| Copy constructor. | |
| VesicaSDF (VesicaSDF &&)=default | |
| Move constructor. | |
| VesicaSDF & | operator= (const VesicaSDF &)=default |
| Copy assignment. | |
| VesicaSDF & | operator= (VesicaSDF &&)=default |
| Move assignment. | |
| const Vec3T< T > & | getTip1 () const noexcept |
| Get one tip. | |
| const Vec3T< T > & | getTip2 () const noexcept |
| Get the other tip. | |
| const T & | getRadius () const noexcept |
| Get the radius at the middle. | |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept |
| Signed distance function for the vesica. | |
| 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_tip1 = Vec3T<T>(T(0), T(-1), T(0)) |
| One tip. | |
| Vec3T< T > | m_tip2 = Vec3T<T>(T(0), T(1), T(0)) |
| The other tip. | |
| T | m_radius = T(0.5) |
| Radius at the middle. | |
Signed distance field for a revolved vesica: a lens between two tips, the vesica (the overlap of two discs) in a plane through the tips, turned around the line through them.
In the cross-section through the axis, the lens' outline is an arc of a circle centered across the axis from it, through both tips; the given radius is the lens' radius at its middle. The distance is exact (Quilez's vesica): to the arc, or to the nearer tip. By default the vesica runs from (0,-1,0) to (0,1,0), with radius 0.5.
| T | Floating-point precision. |
|
inline |
Full constructor.
| [in] | a_tip1 | One tip. |
| [in] | a_tip2 | The other tip; it must differ from a_tip1. |
| [in] | a_radius | The lens' radius at its middle, finite, positive and less than half the distance between the tips (a radius of half that distance would make a ball). |
|
inlinenoexcept |
The shape's axis-aligned bounding box.
|
inlinenoexcept |
Get the radius at the middle.
|
inlinenoexcept |
Get one tip.
|
inlinenoexcept |
Get the other tip.
|
default |
Copy assignment.
|
default |
Move assignment.
|
inlinenoexcept |
Signed distance function for the vesica.
| [in] | a_point | Position. |