Abstract base class for 3-D surface. More...

#include <Core/Surface/Surface3.h>

Inheritance diagram for CubbyFlow::Surface3:
CubbyFlow::Box3 CubbyFlow::Cylinder3 CubbyFlow::ImplicitSurface3 CubbyFlow::Plane3 CubbyFlow::Sphere3 CubbyFlow::SurfaceSet3 CubbyFlow::Triangle3 CubbyFlow::TriangleMesh3

Public Member Functions

 Surface3 (const Transform3 &transform=Transform3(), bool isNormalFlipped=false)
 Constructs a surface with normal direction. More...
 
 Surface3 (const Surface3 &other)
 Copy constructor. More...
 
virtual ~Surface3 ()
 Default destructor. More...
 
Vector3D ClosestPoint (const Vector3D &otherPoint) const
 Returns the closest point from the given point otherPoint to the surface. More...
 
BoundingBox3D BoundingBox () const
 Returns the bounding box of this surface object. More...
 
bool Intersects (const Ray3D &ray) const
 Returns true if the given ray intersects with this surface object. More...
 
double ClosestDistance (const Vector3D &otherPoint) const
 
SurfaceRayIntersection3 ClosestIntersection (const Ray3D &ray) const
 Returns the closest intersection point for given ray. More...
 
Vector3D ClosestNormal (const Vector3D &otherPoint) const
 
virtual void UpdateQueryEngine ()
 Updates internal spatial query engine. More...
 

Public Attributes

Transform3 transform
 Local-to-world transform. More...
 
bool isNormalFlipped = false
 Flips normal when calling Surface3::closestNormal(...). More...
 

Protected Member Functions

virtual Vector3D ClosestPointLocal (const Vector3D &otherPoint) const =0
 
virtual BoundingBox3D BoundingBoxLocal () const =0
 Returns the bounding box of this surface object in local frame. More...
 
virtual SurfaceRayIntersection3 ClosestIntersectionLocal (const Ray3D &ray) const =0
 Returns the closest intersection point for given ray in local frame. More...
 
virtual Vector3D ClosestNormalLocal (const Vector3D &otherPoint) const =0
 
virtual bool IntersectsLocal (const Ray3D &ray) const
 
virtual double ClosestDistanceLocal (const Vector3D &otherPoint) const
 

Detailed Description

Abstract base class for 3-D surface.

Constructor & Destructor Documentation

◆ Surface3() [1/2]

CubbyFlow::Surface3::Surface3 ( const Transform3 transform = Transform3(),
bool  isNormalFlipped = false 
)

Constructs a surface with normal direction.

◆ Surface3() [2/2]

CubbyFlow::Surface3::Surface3 ( const Surface3 other)

Copy constructor.

◆ ~Surface3()

virtual CubbyFlow::Surface3::~Surface3 ( )
virtual

Default destructor.

Member Function Documentation

◆ BoundingBox()

BoundingBox3D CubbyFlow::Surface3::BoundingBox ( ) const

Returns the bounding box of this surface object.

◆ BoundingBoxLocal()

virtual BoundingBox3D CubbyFlow::Surface3::BoundingBoxLocal ( ) const
protectedpure virtual

Returns the bounding box of this surface object in local frame.

Implemented in CubbyFlow::TriangleMesh3, CubbyFlow::Triangle3, CubbyFlow::Cylinder3, CubbyFlow::Plane3, CubbyFlow::SurfaceToImplicit3, and CubbyFlow::Box3.

◆ ClosestDistance()

double CubbyFlow::Surface3::ClosestDistance ( const Vector3D otherPoint) const

Returns the closest distance from the given point otherPoint to the point on the surface.

◆ ClosestDistanceLocal()

virtual double CubbyFlow::Surface3::ClosestDistanceLocal ( const Vector3D otherPoint) const
protectedvirtual

Returns the closest distance from the given point otherPoint to the point on the surface in local frame.

Reimplemented in CubbyFlow::TriangleMesh3, CubbyFlow::Cylinder3, and CubbyFlow::SurfaceToImplicit3.

◆ ClosestIntersection()

SurfaceRayIntersection3 CubbyFlow::Surface3::ClosestIntersection ( const Ray3D ray) const

Returns the closest intersection point for given ray.

◆ ClosestIntersectionLocal()

virtual SurfaceRayIntersection3 CubbyFlow::Surface3::ClosestIntersectionLocal ( const Ray3D ray) const
protectedpure virtual

Returns the closest intersection point for given ray in local frame.

Implemented in CubbyFlow::TriangleMesh3, CubbyFlow::Triangle3, CubbyFlow::Cylinder3, CubbyFlow::Plane3, CubbyFlow::SurfaceToImplicit3, and CubbyFlow::Box3.

◆ ClosestNormal()

Vector3D CubbyFlow::Surface3::ClosestNormal ( const Vector3D otherPoint) const

Returns the normal to the closest point on the surface from the given point otherPoint.

◆ ClosestNormalLocal()

virtual Vector3D CubbyFlow::Surface3::ClosestNormalLocal ( const Vector3D otherPoint) const
protectedpure virtual

Returns the normal to the closest point on the surface from the given point otherPoint in local frame.

Implemented in CubbyFlow::TriangleMesh3, CubbyFlow::Triangle3, CubbyFlow::Cylinder3, CubbyFlow::Plane3, CubbyFlow::SurfaceToImplicit3, and CubbyFlow::Box3.

◆ ClosestPoint()

Vector3D CubbyFlow::Surface3::ClosestPoint ( const Vector3D otherPoint) const

Returns the closest point from the given point otherPoint to the surface.

◆ ClosestPointLocal()

virtual Vector3D CubbyFlow::Surface3::ClosestPointLocal ( const Vector3D otherPoint) const
protectedpure virtual

Returns the closest point from the given point otherPoint to the surface in local frame.

Implemented in CubbyFlow::TriangleMesh3, CubbyFlow::Triangle3, CubbyFlow::Cylinder3, CubbyFlow::Plane3, CubbyFlow::Box3, and CubbyFlow::SurfaceToImplicit3.

◆ Intersects()

bool CubbyFlow::Surface3::Intersects ( const Ray3D ray) const

Returns true if the given ray intersects with this surface object.

◆ IntersectsLocal()

virtual bool CubbyFlow::Surface3::IntersectsLocal ( const Ray3D ray) const
protectedvirtual

Returns true if the given ray intersects with this surface object in local frame.

Reimplemented in CubbyFlow::TriangleMesh3, CubbyFlow::Triangle3, CubbyFlow::Cylinder3, CubbyFlow::Plane3, CubbyFlow::SurfaceToImplicit3, and CubbyFlow::Box3.

◆ UpdateQueryEngine()

virtual void CubbyFlow::Surface3::UpdateQueryEngine ( )
virtual

Updates internal spatial query engine.

Reimplemented in CubbyFlow::TriangleMesh3, CubbyFlow::ImplicitSurfaceSet3, and CubbyFlow::SurfaceSet3.

Member Data Documentation

◆ isNormalFlipped

bool CubbyFlow::Surface3::isNormalFlipped = false

Flips normal when calling Surface3::closestNormal(...).

◆ transform

Transform3 CubbyFlow::Surface3::transform

Local-to-world transform.


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