Jet
v1.3.3
|
2-D implicit surface wrapper for generic Surface2 instance. More...
#include <jet/surface_to_implicit2.h>
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... | |
![]() | |
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... | |
![]() | |
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 | |
![]() | |
Transform2 | transform |
Local-to-world transform. More... | |
bool | isNormalFlipped = false |
Flips normal. More... | |
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.
jet::SurfaceToImplicit2::SurfaceToImplicit2 | ( | const Surface2Ptr & | surface, |
const Transform2 & | transform = Transform2() , |
||
bool | isNormalFlipped = false |
||
) |
Constructs an instance with generic Surface2 instance.
jet::SurfaceToImplicit2::SurfaceToImplicit2 | ( | const SurfaceToImplicit2 & | other | ) |
Copy constructor.
|
overrideprotectedvirtual |
Returns the bounding box of this surface object in local frame.
Implements jet::Surface2.
|
static |
Returns builder fox SurfaceToImplicit2.
|
overrideprotectedvirtual |
Returns the closest distance from the given point otherPoint
to the point on the surface in local frame.
Reimplemented from jet::ImplicitSurface2.
|
overrideprotectedvirtual |
Returns the closest intersection point for given ray
in local frame.
Implements jet::Surface2.
|
overrideprotectedvirtual |
Returns the normal to the closest point on the surface from the given point otherPoint
in local frame.
Implements jet::Surface2.
|
overrideprotectedvirtual |
Returns the closest point from the given point otherPoint
to the surface in local frame.
Implements jet::Surface2.
|
overrideprotectedvirtual |
Returns true if the given ray
intersects with this surface object in local frame.
Reimplemented from jet::Surface2.
|
overridevirtual |
Returns true if bounding box can be defined.
Reimplemented from jet::Surface2.
|
overrideprotectedvirtual |
Returns true if otherPoint
is inside by given depth
the volume defined by the surface in local frame.
Reimplemented from jet::ImplicitSurface2.
|
overridevirtual |
Returns true if the surface is a valid geometry.
Reimplemented from jet::Surface2.
|
overrideprotectedvirtual |
Returns signed distance from the given point otherPoint
in local space.
Implements jet::ImplicitSurface2.
Surface2Ptr jet::SurfaceToImplicit2::surface | ( | ) | const |
Returns the raw surface instance.
|
overridevirtual |
Updates internal spatial query engine.
Reimplemented from jet::Surface2.