Abstract base class for N-D surface. More...
#include <Core/Geometry/Surface.hpp>
Public Member Functions | |
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... | |
Surface & | operator= (const Surface &other) |
Copy assignment operator. More... | |
Surface & | operator= (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 | IsBounded () const |
Returns true if bounding box can be defined. More... | |
virtual bool | IsValidGeometry () const |
Returns true if the surface is a valid geometry. More... | |
bool | IsInside (const Vector< double, N > &otherPoint) const |
Public Attributes | |
Transform< N > | transform |
Local-to-world transform. More... | |
bool | isNormalFlipped = false |
Flips normal. More... | |
Protected Member Functions | |
virtual Vector< double, N > | ClosestPointLocal (const Vector< double, N > &otherPoint) const =0 |
virtual BoundingBox< double, N > | BoundingBoxLocal () const =0 |
Returns the bounding box of this surface object in local frame. More... | |
virtual SurfaceRayIntersection< N > | ClosestIntersectionLocal (const Ray< double, N > &ray) const =0 |
Returns the closest intersection point for given ray in local frame. More... | |
virtual Vector< double, N > | ClosestNormalLocal (const Vector< double, N > &otherPoint) const =0 |
virtual bool | IntersectsLocal (const Ray< double, N > &ray) const |
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::Surface< N >
Abstract base class for N-D surface.
Constructor & Destructor Documentation
◆ Surface() [1/3]
CubbyFlow::Surface< N >::Surface | ( | const Transform< N > & | transform = Transform< N >() , |
bool | isNormalFlipped = false |
||
) |
Constructs a surface with normal direction.
◆ ~Surface()
|
virtualdefault |
Default virtual destructor.
◆ Surface() [2/3]
CubbyFlow::Surface< N >::Surface | ( | const Surface< N > & | other | ) |
Copy constructor.
◆ Surface() [3/3]
|
noexcept |
Move constructor.
Member Function Documentation
◆ BoundingBoxLocal()
|
protectedpure virtual |
Returns the bounding box of this surface object in local frame.
Implemented in CubbyFlow::TriangleMesh3, CubbyFlow::Triangle3, CubbyFlow::SurfaceToImplicit< N >, CubbyFlow::Box< N >, and CubbyFlow::Cylinder3.
◆ ClosestDistance()
double CubbyFlow::Surface< N >::ClosestDistance | ( | const Vector< double, N > & | otherPoint | ) | const |
Returns the closest distance from the given point otherPoint
to the point on the surface.
◆ ClosestDistanceLocal()
|
protectedvirtual |
Returns the closest distance from the given point otherPoint
to the point on the surface in local frame.
Reimplemented in CubbyFlow::SurfaceToImplicit< N >.
◆ ClosestIntersection()
SurfaceRayIntersection<N> CubbyFlow::Surface< N >::ClosestIntersection | ( | const Ray< double, N > & | ray | ) | const |
Returns the closest intersection point for given ray
.
◆ ClosestIntersectionLocal()
|
protectedpure virtual |
Returns the closest intersection point for given ray
in local frame.
Implemented in CubbyFlow::SurfaceToImplicit< N >, and CubbyFlow::Box< N >.
◆ ClosestNormal()
Vector<double, N> CubbyFlow::Surface< N >::ClosestNormal | ( | const Vector< double, N > & | otherPoint | ) | const |
Returns the normal to the closest point on the surface from the given point otherPoint
.
◆ ClosestNormalLocal()
|
protectedpure virtual |
Returns the normal to the closest point on the surface from the given point otherPoint
in local frame.
Implemented in CubbyFlow::SurfaceToImplicit< N >, and CubbyFlow::Box< N >.
◆ ClosestPoint()
Vector<double, N> CubbyFlow::Surface< N >::ClosestPoint | ( | const Vector< double, N > & | otherPoint | ) | const |
Returns the closest point from the given point otherPoint
to the surface.
◆ ClosestPointLocal()
|
protectedpure virtual |
Returns the closest point from the given point otherPoint
to the surface in local frame.
Implemented in CubbyFlow::SurfaceToImplicit< N >, and CubbyFlow::Box< N >.
◆ GetBoundingBox()
BoundingBox<double, N> CubbyFlow::Surface< N >::GetBoundingBox | ( | ) | const |
Returns the bounding box of this surface object.
◆ Intersects()
bool CubbyFlow::Surface< N >::Intersects | ( | const Ray< double, N > & | ray | ) | const |
Returns true if the given ray
intersects with this surface object.
◆ IntersectsLocal()
|
protectedvirtual |
Returns true if the given ray
intersects with this surface object in local frame.
Reimplemented in CubbyFlow::SurfaceToImplicit< N >, and CubbyFlow::Box< N >.
◆ IsBounded()
|
virtual |
Returns true if bounding box can be defined.
Reimplemented in CubbyFlow::ImplicitSurfaceSet< N >, CubbyFlow::SurfaceToImplicit< N >, CubbyFlow::SurfaceSet< N >, and CubbyFlow::Plane< N >.
◆ IsInside()
bool CubbyFlow::Surface< N >::IsInside | ( | const Vector< double, N > & | otherPoint | ) | const |
Returns true if otherPoint
is inside the volume defined by the surface.
◆ IsInsideLocal()
|
protectedvirtual |
Returns true if otherPoint
is inside by given depth
the volume defined by the surface in local frame.
◆ IsValidGeometry()
|
virtual |
Returns true if the surface is a valid geometry.
Reimplemented in CubbyFlow::ImplicitSurfaceSet< N >, CubbyFlow::SurfaceToImplicit< N >, and CubbyFlow::SurfaceSet< N >.
◆ operator=() [1/2]
Surface& CubbyFlow::Surface< N >::operator= | ( | const Surface< N > & | other | ) |
Copy assignment operator.
◆ operator=() [2/2]
|
noexcept |
Move assignment operator.
◆ UpdateQueryEngine()
|
virtual |
Updates internal spatial query engine.
Reimplemented in CubbyFlow::TriangleMesh3, CubbyFlow::ImplicitSurfaceSet< N >, CubbyFlow::SurfaceToImplicit< N >, and CubbyFlow::SurfaceSet< N >.
Member Data Documentation
◆ isNormalFlipped
bool CubbyFlow::Surface< N >::isNormalFlipped = false |
Flips normal.
◆ transform
Transform<N> CubbyFlow::Surface< N >::transform |
Local-to-world transform.
The documentation for this class was generated from the following file:
- Core/Geometry/Surface.hpp