Jet  v1.3.3
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
jet::SurfaceToImplicit2 Class Referencefinal

2-D implicit surface wrapper for generic Surface2 instance. More...

#include <jet/surface_to_implicit2.h>

Inheritance diagram for jet::SurfaceToImplicit2:
jet::ImplicitSurface2 jet::Surface2

Classes

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

Public Member Functions

 SurfaceToImplicit2 (const Surface2Ptr &surface, const Transform2 &transform=Transform2(), bool isNormalFlipped=false)
 Constructs an instance with generic Surface2 instance. More...
 
 SurfaceToImplicit2 (const SurfaceToImplicit2 &other)
 Copy constructor. More...
 
void updateQueryEngine () override
 Updates internal spatial query engine. More...
 
bool isBounded () const override
 Returns true if bounding box can be defined. More...
 
bool isValidGeometry () const override
 Returns true if the surface is a valid geometry. More...
 
Surface2Ptr surface () const
 Returns the raw surface instance. More...
 
- Public Member Functions inherited from jet::ImplicitSurface2
 ImplicitSurface2 (const Transform2 &transform=Transform2(), bool isNormalFlipped=false)
 Default constructor. More...
 
 ImplicitSurface2 (const ImplicitSurface2 &other)
 Copy constructor. More...
 
virtual ~ImplicitSurface2 ()
 Default destructor. More...
 
double signedDistance (const Vector2D &otherPoint) const
 Returns signed distance from the given point otherPoint. More...
 
- Public Member Functions inherited from jet::Surface2
 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
 
bool isInside (const Vector2D &otherPoint) const
 

Static Public Member Functions

static Builder builder ()
 Returns builder fox SurfaceToImplicit2. More...
 

Protected Member Functions

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

Additional Inherited Members

- Public Attributes inherited from jet::Surface2
Transform2 transform
 Local-to-world transform. More...
 
bool isNormalFlipped = false
 Flips normal. More...
 

Detailed Description

2-D implicit surface wrapper for generic Surface2 instance.

This class represents 2-D implicit surface that converts Surface2 instance to an ImplicitSurface2 object. The conversion is made by evaluating closest point and normal from a given point for the given (explicit) surface. Thus, this conversion won't work for every single surfaces. Use this class only for the basic primitives such as Sphere2 or Box2.

Constructor & Destructor Documentation

◆ SurfaceToImplicit2() [1/2]

jet::SurfaceToImplicit2::SurfaceToImplicit2 ( const Surface2Ptr surface,
const Transform2 transform = Transform2(),
bool  isNormalFlipped = false 
)

Constructs an instance with generic Surface2 instance.

◆ SurfaceToImplicit2() [2/2]

jet::SurfaceToImplicit2::SurfaceToImplicit2 ( const SurfaceToImplicit2 other)

Copy constructor.

Member Function Documentation

◆ boundingBoxLocal()

BoundingBox2D jet::SurfaceToImplicit2::boundingBoxLocal ( ) const
overrideprotectedvirtual

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

Implements jet::Surface2.

◆ builder()

static Builder jet::SurfaceToImplicit2::builder ( )
static

Returns builder fox SurfaceToImplicit2.

◆ closestDistanceLocal()

double jet::SurfaceToImplicit2::closestDistanceLocal ( const Vector2D otherPoint) const
overrideprotectedvirtual

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

Reimplemented from jet::ImplicitSurface2.

◆ closestIntersectionLocal()

SurfaceRayIntersection2 jet::SurfaceToImplicit2::closestIntersectionLocal ( const Ray2D ray) const
overrideprotectedvirtual

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

Implements jet::Surface2.

◆ closestNormalLocal()

Vector2D jet::SurfaceToImplicit2::closestNormalLocal ( const Vector2D otherPoint) const
overrideprotectedvirtual

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

Implements jet::Surface2.

◆ closestPointLocal()

Vector2D jet::SurfaceToImplicit2::closestPointLocal ( const Vector2D otherPoint) const
overrideprotectedvirtual

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

Implements jet::Surface2.

◆ intersectsLocal()

bool jet::SurfaceToImplicit2::intersectsLocal ( const Ray2D ray) const
overrideprotectedvirtual

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

Reimplemented from jet::Surface2.

◆ isBounded()

bool jet::SurfaceToImplicit2::isBounded ( ) const
overridevirtual

Returns true if bounding box can be defined.

Reimplemented from jet::Surface2.

◆ isInsideLocal()

bool jet::SurfaceToImplicit2::isInsideLocal ( const Vector2D otherPoint) const
overrideprotectedvirtual

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

Reimplemented from jet::ImplicitSurface2.

◆ isValidGeometry()

bool jet::SurfaceToImplicit2::isValidGeometry ( ) const
overridevirtual

Returns true if the surface is a valid geometry.

Reimplemented from jet::Surface2.

◆ signedDistanceLocal()

double jet::SurfaceToImplicit2::signedDistanceLocal ( const Vector2D otherPoint) const
overrideprotectedvirtual

Returns signed distance from the given point otherPoint in local space.

Implements jet::ImplicitSurface2.

◆ surface()

Surface2Ptr jet::SurfaceToImplicit2::surface ( ) const

Returns the raw surface instance.

◆ updateQueryEngine()

void jet::SurfaceToImplicit2::updateQueryEngine ( )
overridevirtual

Updates internal spatial query engine.

Reimplemented from jet::Surface2.


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