Abstract base class for 2-D surface. More...
#include <Core/Surface/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 |
Returns the closest point from the given point otherPoint to the surface. More... | |
| 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... | |
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 |
Detailed Description
Abstract base class for 2-D surface.
Constructor & Destructor Documentation
◆ Surface2() [1/2]
| CubbyFlow::Surface2::Surface2 | ( | const Transform2 & | transform = Transform2(), |
| bool | isNormalFlipped = false |
||
| ) |
Constructs a surface with normal direction.
◆ Surface2() [2/2]
| CubbyFlow::Surface2::Surface2 | ( | const Surface2 & | other | ) |
Copy constructor.
◆ ~Surface2()
|
virtual |
Default destructor.
Member Function Documentation
◆ BoundingBox()
| BoundingBox2D CubbyFlow::Surface2::BoundingBox | ( | ) | const |
Returns the bounding box of this surface object.
◆ BoundingBoxLocal()
|
protectedpure virtual |
Returns the bounding box of this surface object in local frame.
Implemented in CubbyFlow::Box2, and CubbyFlow::SurfaceToImplicit2.
◆ ClosestDistance()
| double CubbyFlow::Surface2::ClosestDistance | ( | const Vector2D & | otherPoint | ) | const |
Returns the closest distance from the given point otherPoint to the point on the surface.
◆ ClosestDistanceLocal()
|
protectedvirtual |
Returns the closest distance from the given point otherPoint to the point on the surface in local frame.
Reimplemented in CubbyFlow::SurfaceToImplicit2.
◆ ClosestIntersection()
| SurfaceRayIntersection2 CubbyFlow::Surface2::ClosestIntersection | ( | const Ray2D & | ray | ) | const |
Returns the closest intersection point for given ray.
◆ ClosestIntersectionLocal()
|
protectedpure virtual |
Returns the closest intersection point for given ray in local frame.
Implemented in CubbyFlow::SurfaceToImplicit2, and CubbyFlow::Box2.
◆ ClosestNormal()
Returns the normal to the closest point on the surface from the given point otherPoint.
◆ ClosestNormalLocal()
|
protectedpure virtual |
Returns the normal to the closest point on the surface from the given point otherPoint in local frame.
Implemented in CubbyFlow::Box2, and CubbyFlow::SurfaceToImplicit2.
◆ ClosestPoint()
Returns the closest point from the given point otherPoint to the surface.
◆ ClosestPointLocal()
|
protectedpure virtual |
Returns the closest point from the given point otherPoint to the surface in local frame.
Implemented in CubbyFlow::Box2, and CubbyFlow::SurfaceToImplicit2.
◆ Intersects()
| bool CubbyFlow::Surface2::Intersects | ( | const Ray2D & | ray | ) | const |
Returns true if the given ray intersects with this surface object.
◆ IntersectsLocal()
|
protectedvirtual |
Returns true if the given ray intersects with this surface object in local frame.
Reimplemented in CubbyFlow::Box2, and CubbyFlow::SurfaceToImplicit2.
◆ UpdateQueryEngine()
|
virtual |
Updates internal spatial query engine.
Reimplemented in CubbyFlow::ImplicitSurfaceSet2, and CubbyFlow::SurfaceSet2.
Member Data Documentation
◆ isNormalFlipped
| bool CubbyFlow::Surface2::isNormalFlipped = false |
Flips normal.
◆ transform
| Transform2 CubbyFlow::Surface2::transform |
Local-to-world transform.
The documentation for this class was generated from the following file:
- Core/Surface/Surface2.h
1.8.14