Jet
v1.3.3
|
Abstract base class for 2-D surface. More...
#include <jet/surface2.h>
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 |
Abstract base class for 2-D surface.
jet::Surface2::Surface2 | ( | const Transform2 & | transform = Transform2() , |
bool | isNormalFlipped = false |
||
) |
Constructs a surface with normal direction.
jet::Surface2::Surface2 | ( | const Surface2 & | other | ) |
Copy constructor.
|
virtual |
Default destructor.
BoundingBox2D jet::Surface2::boundingBox | ( | ) | const |
Returns the bounding box of this surface object.
|
protectedpure virtual |
Returns the bounding box of this surface object in local frame.
Implemented in jet::Box2, and jet::SurfaceToImplicit2.
double jet::Surface2::closestDistance | ( | const Vector2D & | otherPoint | ) | const |
Returns the closest distance from the given point otherPoint
to the point on the surface.
|
protectedvirtual |
Returns the closest distance from the given point otherPoint
to the point on the surface in local frame.
Reimplemented in jet::SurfaceToImplicit2.
SurfaceRayIntersection2 jet::Surface2::closestIntersection | ( | const Ray2D & | ray | ) | const |
Returns the closest intersection point for given ray
.
|
protectedpure virtual |
Returns the closest intersection point for given ray
in local frame.
Implemented in jet::SurfaceToImplicit2, and jet::Box2.
Returns the normal to the closest point on the surface from the given point otherPoint
.
|
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.
Returns the closest point from the given point otherPoint
to the surface.
|
protectedpure virtual |
Returns the closest point from the given point otherPoint
to the surface in local frame.
Implemented in jet::Box2, and jet::SurfaceToImplicit2.
bool jet::Surface2::intersects | ( | const Ray2D & | ray | ) | const |
Returns true if the given ray
intersects with this surface object.
|
protectedvirtual |
Returns true if the given ray
intersects with this surface object in local frame.
Reimplemented in jet::Box2, and jet::SurfaceToImplicit2.
|
virtual |
Returns true if bounding box can be defined.
Reimplemented in jet::ImplicitSurfaceSet2, jet::Plane2, jet::SurfaceSet2, and jet::SurfaceToImplicit2.
bool jet::Surface2::isInside | ( | const Vector2D & | otherPoint | ) | const |
Returns true if otherPoint
is inside the volume defined by the surface.
|
protectedvirtual |
Returns true if otherPoint
is inside by given depth
the volume defined by the surface in local frame.
Reimplemented in jet::SurfaceToImplicit2.
|
virtual |
Returns true if the surface is a valid geometry.
Reimplemented in jet::ImplicitSurfaceSet2, jet::SurfaceSet2, and jet::SurfaceToImplicit2.
|
virtual |
Updates internal spatial query engine.
Reimplemented in jet::ImplicitSurfaceSet2, jet::SurfaceSet2, and jet::SurfaceToImplicit2.
bool jet::Surface2::isNormalFlipped = false |
Flips normal.
Transform2 jet::Surface2::transform |
Local-to-world transform.