CubbyFlow::Plane< N > Class Template Referencefinal

N-D plane geometry. More...

#include <Core/Geometry/Plane.hpp>

Inheritance diagram for CubbyFlow::Plane< N >:
CubbyFlow::Surface< N >

Classes

class  Builder
 Front-end to create Plane objects step by step. More...
 

Public Member Functions

 Plane (const Transform< N > &_transform=Transform< N >{}, bool _isNormalFlipped=false)
 
 Plane (const Vector< double, N > &normal, const Vector< double, N > &point, const Transform< N > &_transform=Transform< N >{}, bool _isNormalFlipped=false)
 Constructs a plane that cross point with surface normal normal. More...
 
 ~Plane () override=default
 Default virtual destructor. More...
 
 Plane (const Plane &other)
 Copy constructor. More...
 
 Plane (Plane &&other) noexcept
 Move constructor. More...
 
Planeoperator= (const Plane &other)
 Copy assignment operator. More...
 
Planeoperator= (Plane &&other) noexcept
 Move assignment operator. More...
 
bool IsBounded () const override
 Returns true if bounding box can be defined. More...
 
- Public Member Functions inherited from CubbyFlow::Surface< N >
 Surface (const Transform< N > &transform=Transform< N >(), bool isNormalFlipped=false)
 Constructs a surface with normal direction. More...
 
virtual ~Surface ()=default
 Default virtual destructor. More...
 
 Surface (const Surface &other)
 Copy constructor. More...
 
 Surface (Surface &&other) noexcept
 Move constructor. More...
 
Surfaceoperator= (const Surface &other)
 Copy assignment operator. More...
 
Surfaceoperator= (Surface &&other) noexcept
 Move assignment operator. More...
 
Vector< double, N > ClosestPoint (const Vector< double, N > &otherPoint) const
 
BoundingBox< double, N > GetBoundingBox () const
 Returns the bounding box of this surface object. More...
 
bool Intersects (const Ray< double, N > &ray) const
 Returns true if the given ray intersects with this surface object. More...
 
double ClosestDistance (const Vector< double, N > &otherPoint) const
 
SurfaceRayIntersection< N > ClosestIntersection (const Ray< double, N > &ray) const
 Returns the closest intersection point for given ray. More...
 
Vector< double, N > ClosestNormal (const Vector< double, N > &otherPoint) const
 
virtual void UpdateQueryEngine ()
 Updates internal spatial query engine. More...
 
virtual bool IsValidGeometry () const
 Returns true if the surface is a valid geometry. More...
 
bool IsInside (const Vector< double, N > &otherPoint) const
 

Static Public Member Functions

static Builder GetBuilder ()
 Returns builder fox Plane. More...
 

Public Attributes

Vector< double, N > normal = Vector<double, N>::MakeUnitY()
 Plane normal. More...
 
Vector< double, N > point
 Point that lies on the plane. More...
 
- Public Attributes inherited from CubbyFlow::Surface< N >
Transform< N > transform
 Local-to-world transform. More...
 
bool isNormalFlipped = false
 Flips normal. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CubbyFlow::Surface< N >
virtual double ClosestDistanceLocal (const Vector< double, N > &otherPoint) const
 
virtual bool IsInsideLocal (const Vector< double, N > &otherPoint) const
 

Detailed Description

template<size_t N>
class CubbyFlow::Plane< N >

N-D plane geometry.

This class represents N-D plane geometry which extends Surface by overriding surface-related queries.

Constructor & Destructor Documentation

◆ Plane() [1/4]

template<size_t N>
CubbyFlow::Plane< N >::Plane ( const Transform< N > &  _transform = Transform< N >{},
bool  _isNormalFlipped = false 
)

Constructs a plane that crosses (0, 0, ...) with surface normal (y-axis).

◆ Plane() [2/4]

template<size_t N>
CubbyFlow::Plane< N >::Plane ( const Vector< double, N > &  normal,
const Vector< double, N > &  point,
const Transform< N > &  _transform = Transform< N >{},
bool  _isNormalFlipped = false 
)

Constructs a plane that cross point with surface normal normal.

◆ ~Plane()

template<size_t N>
CubbyFlow::Plane< N >::~Plane ( )
overridedefault

Default virtual destructor.

◆ Plane() [3/4]

template<size_t N>
CubbyFlow::Plane< N >::Plane ( const Plane< N > &  other)

Copy constructor.

◆ Plane() [4/4]

template<size_t N>
CubbyFlow::Plane< N >::Plane ( Plane< N > &&  other)
noexcept

Move constructor.

Member Function Documentation

◆ GetBuilder()

template<size_t N>
static Builder CubbyFlow::Plane< N >::GetBuilder ( )
static

Returns builder fox Plane.

◆ IsBounded()

template<size_t N>
bool CubbyFlow::Plane< N >::IsBounded ( ) const
overridevirtual

Returns true if bounding box can be defined.

Reimplemented from CubbyFlow::Surface< N >.

◆ operator=() [1/2]

template<size_t N>
Plane& CubbyFlow::Plane< N >::operator= ( const Plane< N > &  other)

Copy assignment operator.

◆ operator=() [2/2]

template<size_t N>
Plane& CubbyFlow::Plane< N >::operator= ( Plane< N > &&  other)
noexcept

Move assignment operator.

Member Data Documentation

◆ normal

template<size_t N>
Vector<double, N> CubbyFlow::Plane< N >::normal = Vector<double, N>::MakeUnitY()

Plane normal.

◆ point

template<size_t N>
Vector<double, N> CubbyFlow::Plane< N >::point

Point that lies on the plane.


The documentation for this class was generated from the following file: