|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Signed distance function for a plane. More...
#include <EBGeometry_AnalyticDistanceFunctions.hpp>
Public Member Functions | |
| PlaneSDF ()=default | |
| Default constructor. Constructs the y = 0 plane with outward normal (0, 1, 0). | |
| PlaneSDF (const Vec3T< T > &a_point, const Vec3T< T > &a_normal) noexcept | |
| Full constructor. | |
| PlaneSDF (const PlaneSDF &)=default | |
| Copy constructor. | |
| PlaneSDF (PlaneSDF &&)=default | |
| Move constructor. | |
| PlaneSDF & | operator= (const PlaneSDF &)=default |
| Copy assignment. | |
| PlaneSDF & | operator= (PlaneSDF &&)=default |
| Move assignment. | |
| T | signedDistance (const Vec3T< T > &a_point) const noexcept |
| Signed distance function for the plane. | |
| BoundingVolumes::AABBT< T > | computeBoundingVolume () const noexcept |
| The shape's axis-aligned bounding box. | |
| const Vec3T< T > & | getPoint () const noexcept |
| Get the point on the plane. | |
| const Vec3T< T > & | getNormal () const noexcept |
| Get the unit normal of the plane. | |
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_point = Vec3T<T>::zeros() |
| Point on plane. | |
| Vec3T< T > | m_normal = Vec3T<T>(T(0), T(1), T(0)) |
| Plane normal vector (unit length). | |
Signed distance function for a plane.
The SDF evaluates to dot(a_point - m_point, m_normal): positive on the half-space the normal points into, negative on the opposite side. The plane itself is the zero level-set. m_normal must be unit length for the SDF to return a true distance; the full constructor normalizes the input automatically. By default the plane is the y = 0 plane with normal (0,1,0).
| T | Floating-point precision. |
|
default |
Default constructor. Constructs the y = 0 plane with outward normal (0, 1, 0).
The default plane passes through the origin and separates y < 0 (negative SDF) from y > 0 (positive SDF).
|
inlinenoexcept |
Full constructor.
| [in] | a_point | Any point on the plane. |
| [in] | a_normal | Plane normal vector (need not be unit length; it is normalized internally). |
|
inlinenoexcept |
The shape's axis-aligned bounding box.
A plane is unbounded in every direction a box can describe, so the box is the whole space.
|
inlinenoexcept |
Get the unit normal of the plane.
|
inlinenoexcept |
Get the point on the plane.
|
default |
Copy assignment.
|
default |
Move assignment.
|
inlinenoexcept |
Signed distance function for the plane.
| [in] | a_point | Position. |