Jet  v1.3.3
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
jet::Surface3 Class Referenceabstract

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

#include <jet/surface3.h>

Inheritance diagram for jet::Surface3:
jet::Box3 jet::Cylinder3 jet::ImplicitSurface3 jet::Plane3 jet::Sphere3 jet::SurfaceSet3 jet::Triangle3 jet::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
 
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...
 
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 Vector3D &otherPoint) const
 

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
 
virtual bool isInsideLocal (const Vector3D &otherPoint) const
 

Detailed Description

Abstract base class for 3-D surface.

Constructor & Destructor Documentation

◆ Surface3() [1/2]

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

Constructs a surface with normal direction.

◆ Surface3() [2/2]

jet::Surface3::Surface3 ( const Surface3 other)

Copy constructor.

◆ ~Surface3()

virtual jet::Surface3::~Surface3 ( )
virtual

Default destructor.

Member Function Documentation

◆ boundingBox()

BoundingBox3D jet::Surface3::boundingBox ( ) const

Returns the bounding box of this surface object.

◆ boundingBoxLocal()

virtual BoundingBox3D jet::Surface3::boundingBoxLocal ( ) const
protectedpure virtual

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

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

◆ closestDistance()

double jet::Surface3::closestDistance ( const Vector3D otherPoint) const

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

◆ closestDistanceLocal()

virtual double jet::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 jet::TriangleMesh3, jet::Cylinder3, and jet::SurfaceToImplicit3.

◆ closestIntersection()

SurfaceRayIntersection3 jet::Surface3::closestIntersection ( const Ray3D ray) const

Returns the closest intersection point for given ray.

◆ closestIntersectionLocal()

virtual SurfaceRayIntersection3 jet::Surface3::closestIntersectionLocal ( const Ray3D ray) const
protectedpure virtual

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

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

◆ closestNormal()

Vector3D jet::Surface3::closestNormal ( const Vector3D otherPoint) const

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

◆ closestNormalLocal()

virtual Vector3D jet::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 jet::TriangleMesh3, jet::Triangle3, jet::Plane3, jet::Box3, jet::Cylinder3, and jet::SurfaceToImplicit3.

◆ closestPoint()

Vector3D jet::Surface3::closestPoint ( const Vector3D otherPoint) const

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

◆ closestPointLocal()

virtual Vector3D jet::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 jet::TriangleMesh3, jet::Triangle3, jet::Plane3, jet::Box3, jet::Cylinder3, and jet::SurfaceToImplicit3.

◆ intersects()

bool jet::Surface3::intersects ( const Ray3D ray) const

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

◆ intersectsLocal()

virtual bool jet::Surface3::intersectsLocal ( const Ray3D ray) const
protectedvirtual

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

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

◆ isBounded()

virtual bool jet::Surface3::isBounded ( ) const
virtual

Returns true if bounding box can be defined.

Reimplemented in jet::Plane3, jet::ImplicitSurfaceSet3, jet::SurfaceSet3, and jet::SurfaceToImplicit3.

◆ isInside()

bool jet::Surface3::isInside ( const Vector3D otherPoint) const

Returns true if otherPoint is inside the volume defined by the surface.

◆ isInsideLocal()

virtual bool jet::Surface3::isInsideLocal ( const Vector3D otherPoint) const
protectedvirtual

Returns true if otherPoint is inside by given depth the volume defined by the surface in local frame.

Reimplemented in jet::TriangleMesh3, and jet::SurfaceToImplicit3.

◆ isValidGeometry()

virtual bool jet::Surface3::isValidGeometry ( ) const
virtual

Returns true if the surface is a valid geometry.

Reimplemented in jet::ImplicitSurfaceSet3, jet::SurfaceSet3, and jet::SurfaceToImplicit3.

◆ updateQueryEngine()

virtual void jet::Surface3::updateQueryEngine ( )
virtual

Updates internal spatial query engine.

Reimplemented in jet::TriangleMesh3, jet::ImplicitSurfaceSet3, jet::SurfaceSet3, and jet::SurfaceToImplicit3.

Member Data Documentation

◆ isNormalFlipped

bool jet::Surface3::isNormalFlipped = false

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

◆ transform

Transform3 jet::Surface3::transform

Local-to-world transform.


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