Signed distance field for a cut sphere: the part of a sphere above a horizontal plane, a dome or a sphere with a flat bottom.
More...
|
|
| CutSphereSDF ()=default |
| | Default constructor. Constructs the upper half of the unit sphere at the origin.
|
| |
| | CutSphereSDF (const Vec3T< T > &a_center, const T a_radius, const T a_height) |
| | Full constructor.
|
| |
|
| CutSphereSDF (const CutSphereSDF &)=default |
| | Copy constructor.
|
| |
|
| CutSphereSDF (CutSphereSDF &&)=default |
| | Move constructor.
|
| |
| CutSphereSDF & | operator= (const CutSphereSDF &)=default |
| | Copy assignment.
|
| |
| CutSphereSDF & | operator= (CutSphereSDF &&)=default |
| | Move assignment.
|
| |
| const Vec3T< T > & | getCenter () const noexcept |
| | Get the center of the sphere.
|
| |
| const T & | getRadius () const noexcept |
| | Get the radius.
|
| |
| const T & | getHeight () const noexcept |
| | Get the height of the cut plane above the center.
|
| |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept |
| | Signed distance function for the cut sphere.
|
| |
| uint32_t | getNumParts () const noexcept |
| | How many parts the shape has (see hasParts): 2.
|
| |
| uint32_t | closestPart (const Vec3T< T > &a_point) const noexcept |
| | The part whose term decides the value at a point (see hasParts): 0 the sphere, 1 the flat cut face (its rim included).
|
| |
| BoundingVolumes::AABBT< T > | computeBoundingVolume () const noexcept |
| | The shape's axis-aligned bounding box.
|
| |
template<class T>
class EBGeometry::CutSphereSDF< T >
Signed distance field for a cut sphere: the part of a sphere above a horizontal plane, a dome or a sphere with a flat bottom.
The solid is the part of the sphere at y >= center.y + height: a dome (a spherical cap) for a positive height, more than a hemisphere for a negative one. The distance is exact (Quilez's cut sphere): in the plane through the y axis, the point is nearest the sphere, the flat face or the rim between them. Turn it with Rotate. By default it is the upper half of the unit sphere at the origin.
- Template Parameters
-
| T | Floating-point precision. |