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

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

#include <jet/surface2.h>

Inheritance diagram for jet::Surface2:
jet::Box2 jet::ImplicitSurface2 jet::Plane2 jet::Sphere2 jet::SurfaceSet2 jet::CustomImplicitSurface2 jet::ImplicitSurfaceSet2 jet::SurfaceToImplicit2

Public Member Functions

 Surface2 (const Transform2 &transform=Transform2(), bool isNormalFlipped=false)
 Constructs a surface with normal direction. More...
 
 Surface2 (const Surface2 &other)
 Copy constructor. More...
 
virtual ~Surface2 ()
 Default destructor. More...
 
Vector2D closestPoint (const Vector2D &otherPoint) const
 
BoundingBox2D boundingBox () const
 Returns the bounding box of this surface object. More...
 
bool intersects (const Ray2D &ray) const
 Returns true if the given ray intersects with this surface object. More...
 
double closestDistance (const Vector2D &otherPoint) const
 
SurfaceRayIntersection2 closestIntersection (const Ray2D &ray) const
 Returns the closest intersection point for given ray. More...
 
Vector2D closestNormal (const Vector2D &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 Vector2D &otherPoint) const
 

Public Attributes

Transform2 transform
 Local-to-world transform. More...
 
bool isNormalFlipped = false
 Flips normal. More...
 

Protected Member Functions

virtual Vector2D closestPointLocal (const Vector2D &otherPoint) const =0
 
virtual BoundingBox2D boundingBoxLocal () const =0
 Returns the bounding box of this surface object in local frame. More...
 
virtual SurfaceRayIntersection2 closestIntersectionLocal (const Ray2D &ray) const =0
 Returns the closest intersection point for given ray in local frame. More...
 
virtual Vector2D closestNormalLocal (const Vector2D &otherPoint) const =0
 
virtual bool intersectsLocal (const Ray2D &ray) const
 
virtual double closestDistanceLocal (const Vector2D &otherPoint) const
 
virtual bool isInsideLocal (const Vector2D &otherPoint) const
 

Detailed Description

Abstract base class for 2-D surface.

Constructor & Destructor Documentation

◆ Surface2() [1/2]

jet::Surface2::Surface2 ( const Transform2 transform = Transform2(),
bool  isNormalFlipped = false 
)

Constructs a surface with normal direction.

◆ Surface2() [2/2]

jet::Surface2::Surface2 ( const Surface2 other)

Copy constructor.

◆ ~Surface2()

virtual jet::Surface2::~Surface2 ( )
virtual

Default destructor.

Member Function Documentation

◆ boundingBox()

BoundingBox2D jet::Surface2::boundingBox ( ) const

Returns the bounding box of this surface object.

◆ boundingBoxLocal()

virtual BoundingBox2D jet::Surface2::boundingBoxLocal ( ) const
protectedpure virtual

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

Implemented in jet::Box2, and jet::SurfaceToImplicit2.

◆ closestDistance()

double jet::Surface2::closestDistance ( const Vector2D otherPoint) const

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

◆ closestDistanceLocal()

virtual double jet::Surface2::closestDistanceLocal ( const Vector2D otherPoint) const
protectedvirtual

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

Reimplemented in jet::SurfaceToImplicit2.

◆ closestIntersection()

SurfaceRayIntersection2 jet::Surface2::closestIntersection ( const Ray2D ray) const

Returns the closest intersection point for given ray.

◆ closestIntersectionLocal()

virtual SurfaceRayIntersection2 jet::Surface2::closestIntersectionLocal ( const Ray2D ray) const
protectedpure virtual

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

Implemented in jet::SurfaceToImplicit2, and jet::Box2.

◆ closestNormal()

Vector2D jet::Surface2::closestNormal ( const Vector2D otherPoint) const

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

◆ closestNormalLocal()

virtual Vector2D jet::Surface2::closestNormalLocal ( const Vector2D 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::Box2, and jet::SurfaceToImplicit2.

◆ closestPoint()

Vector2D jet::Surface2::closestPoint ( const Vector2D otherPoint) const

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

◆ closestPointLocal()

virtual Vector2D jet::Surface2::closestPointLocal ( const Vector2D otherPoint) const
protectedpure virtual

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

Implemented in jet::Box2, and jet::SurfaceToImplicit2.

◆ intersects()

bool jet::Surface2::intersects ( const Ray2D ray) const

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

◆ intersectsLocal()

virtual bool jet::Surface2::intersectsLocal ( const Ray2D ray) const
protectedvirtual

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

Reimplemented in jet::Box2, and jet::SurfaceToImplicit2.

◆ isBounded()

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

Returns true if bounding box can be defined.

Reimplemented in jet::ImplicitSurfaceSet2, jet::Plane2, jet::SurfaceSet2, and jet::SurfaceToImplicit2.

◆ isInside()

bool jet::Surface2::isInside ( const Vector2D otherPoint) const

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

◆ isInsideLocal()

virtual bool jet::Surface2::isInsideLocal ( const Vector2D otherPoint) const
protectedvirtual

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

Reimplemented in jet::SurfaceToImplicit2.

◆ isValidGeometry()

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

Returns true if the surface is a valid geometry.

Reimplemented in jet::ImplicitSurfaceSet2, jet::SurfaceSet2, and jet::SurfaceToImplicit2.

◆ updateQueryEngine()

virtual void jet::Surface2::updateQueryEngine ( )
virtual

Updates internal spatial query engine.

Reimplemented in jet::ImplicitSurfaceSet2, jet::SurfaceSet2, and jet::SurfaceToImplicit2.

Member Data Documentation

◆ isNormalFlipped

bool jet::Surface2::isNormalFlipped = false

Flips normal.

◆ transform

Transform2 jet::Surface2::transform

Local-to-world transform.


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