Defines an oriented plane within a 2-D or 3-D Euclidean space and provides associated operators, such as, projection, signed distance, orientation, etc.
More...
|
AXOM_HOST_DEVICE int | getDimension () const |
| Returns the dimension of the Plane. More...
|
|
AXOM_HOST_DEVICE const VectorType & | getNormal () const |
| Returns a const pointer to the plane's unit normal. More...
|
|
AXOM_HOST_DEVICE T | getOffset () const |
| Returns the offset of the plane from origin. More...
|
|
AXOM_HOST_DEVICE T | signedDistance (const PointType &x) const |
| Computes the signed distance of the specified point to this Plane. More...
|
|
PointType | projectPoint (const PointType &x) const |
| Computes the projection of a given point, x, onto this Plane. More...
|
|
void | flip () |
| Flips the orientation of the plane. More...
|
|
AXOM_HOST_DEVICE int | getOrientation (const PointType &x, double TOL=1.e-9) const |
| Computes the orientation of the point with respect to this Plane. More...
|
|
std::ostream & | print (std::ostream &os) const |
| Prints the Plane information in the given output stream. More...
|
|
|
AXOM_HOST_DEVICE | Plane (const VectorType &normal, const PointType &x) |
| Constructs a Plane with a given normal, \( \mathcal{N} \), that passes through the specified point, \( x \). More...
|
|
AXOM_HOST_DEVICE | Plane (const VectorType &normal, T offset) |
| Constructs a plane with a specified normal, \( \mathcal{N} \), located at the given offset from origin. More...
|
|
template<typename T, int NDIMS>
class axom::primal::Plane< T, NDIMS >
Defines an oriented plane within a 2-D or 3-D Euclidean space and provides associated operators, such as, projection, signed distance, orientation, etc.
The Plane object defines an oriented plane in Hessian Normal form:
\f$ \mathcal{N} \cdot x - d = 0 \f$
where, \( \mathcal{N} \) is a unit normal and \( d \) is the offset of the plane (in the direction of the specified normal) to the origin.
The Plane class defines a co-dimension-one plane that splits the ambient space into two halfspaces, such that, the signed distance for any point is: (a) negative below the plance, (b) positive above the plane and (c) zero on the plane.
A Plane object may be constructed in three ways:
- Specifying a normal and a point that the plane passes through
- Specifying a normal and an offset from the origin, or
- Specifying the points that the plane passes through. A minimum of two points are required to define a plane in 2D, or, three points for 3D.
- Template Parameters
-
T | the underlying data type, e.g., double, float, etc. |
NDIMS | the number of dimensions |
- Precondition
- NDIMS==2 || NDIMS==3