N-D implicit surface wrapper for generic Surface instance. More...
#include <Core/Geometry/SurfaceToImplicit.hpp>
Classes | |
| class | Builder |
| Front-end to create SurfaceToImplicit objects step by step. More... | |
Public Member Functions | |
| SurfaceToImplicit (std::shared_ptr< Surface< N > > surface, const Transform< N > &_transform=Transform< N >{}, bool _isNormalFlipped=false) | |
| Constructs an instance with generic Surface2 instance. | |
| ~SurfaceToImplicit () override=default | |
| Default virtual destructor. | |
| SurfaceToImplicit (const SurfaceToImplicit &other) | |
| Copy constructor. | |
| SurfaceToImplicit (SurfaceToImplicit &&other) noexcept | |
| Move constructor. | |
| SurfaceToImplicit & | operator= (const SurfaceToImplicit &other) |
| Copy assignment operator. | |
| SurfaceToImplicit & | operator= (SurfaceToImplicit &&other) noexcept |
| Move assignment operator. | |
| void | UpdateQueryEngine () override |
| Updates internal spatial query engine. | |
| bool | IsBounded () const override |
| Returns true if bounding box can be defined. | |
| bool | IsValidGeometry () const override |
| Returns true if the surface is a valid geometry. | |
| std::shared_ptr< Surface< N > > | GetSurface () const |
| Returns the raw surface instance. | |
Public Member Functions inherited from CubbyFlow::ImplicitSurface< N > | |
| ImplicitSurface (const Transform< N > &_transform=Transform< N >{}, bool _isNormalFlipped=false) | |
| Constructs an implicit surface with normal direction. | |
| ~ImplicitSurface () override=default | |
| Default virtual destructor. | |
| ImplicitSurface (const ImplicitSurface &other) | |
| Copy constructor. | |
| ImplicitSurface (ImplicitSurface &&other) noexcept | |
| Move constructor. | |
| ImplicitSurface & | operator= (const ImplicitSurface &other) |
| Copy assignment operator. | |
| ImplicitSurface & | operator= (ImplicitSurface &&other) noexcept |
| Move assignment operator. | |
| double | SignedDistance (const Vector< double, N > &otherPoint) const |
Returns signed distance from the given point otherPoint. | |
Public Member Functions inherited from CubbyFlow::Surface< N > | |
| Surface (const Transform< N > &transform=Transform< N >(), bool isNormalFlipped=false) | |
| Constructs a surface with normal direction. | |
| virtual | ~Surface ()=default |
| Default virtual destructor. | |
| Surface (const Surface &other) | |
| Copy constructor. | |
| Surface (Surface &&other) noexcept | |
| Move constructor. | |
| Surface & | operator= (const Surface &other) |
| Copy assignment operator. | |
| Surface & | operator= (Surface &&other) noexcept |
| Move assignment operator. | |
| Vector< double, N > | ClosestPoint (const Vector< double, N > &otherPoint) const |
| BoundingBox< double, N > | GetBoundingBox () const |
| Returns the bounding box of this surface object. | |
| bool | Intersects (const Ray< double, N > &ray) const |
Returns true if the given ray intersects with this surface object. | |
| double | ClosestDistance (const Vector< double, N > &otherPoint) const |
| SurfaceRayIntersection< N > | ClosestIntersection (const Ray< double, N > &ray) const |
Returns the closest intersection point for given ray. | |
| Vector< double, N > | ClosestNormal (const Vector< double, N > &otherPoint) const |
| bool | IsInside (const Vector< double, N > &otherPoint) const |
Static Public Member Functions | |
| static Builder | GetBuilder () |
| Returns builder fox SurfaceToImplicit. | |
Protected Member Functions | |
| Vector< double, N > | ClosestPointLocal (const Vector< double, N > &otherPoint) const override |
| double | ClosestDistanceLocal (const Vector< double, N > &otherPoint) const override |
| bool | IntersectsLocal (const Ray< double, N > &ray) const override |
| BoundingBox< double, N > | BoundingBoxLocal () const override |
| Returns the bounding box of this surface object in local frame. | |
| Vector< double, N > | ClosestNormalLocal (const Vector< double, N > &otherPoint) const override |
| double | SignedDistanceLocal (const Vector< double, N > &otherPoint) const override |
| SurfaceRayIntersection< N > | ClosestIntersectionLocal (const Ray< double, N > &ray) const override |
Returns the closest intersection point for given ray in local frame. | |
Protected Member Functions inherited from CubbyFlow::Surface< N > | |
| virtual bool | IsInsideLocal (const Vector< double, N > &otherPoint) const |
Additional Inherited Members | |
Public Attributes inherited from CubbyFlow::Surface< N > | |
| Transform< N > | transform |
| Local-to-world transform. | |
| bool | isNormalFlipped = false |
| Flips normal. | |
Detailed Description
class CubbyFlow::SurfaceToImplicit< N >
N-D implicit surface wrapper for generic Surface instance.
This class represents N-D implicit surface that converts Surface instance to an ImplicitSurface 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 Sphere or Box.
Constructor & Destructor Documentation
◆ SurfaceToImplicit() [1/3]
| CubbyFlow::SurfaceToImplicit< N >::SurfaceToImplicit | ( | std::shared_ptr< Surface< N > > | surface, |
| const Transform< N > & | _transform = Transform< N >{}, |
||
| bool | _isNormalFlipped = false |
||
| ) |
Constructs an instance with generic Surface2 instance.
◆ ~SurfaceToImplicit()
|
overridedefault |
Default virtual destructor.
◆ SurfaceToImplicit() [2/3]
| CubbyFlow::SurfaceToImplicit< N >::SurfaceToImplicit | ( | const SurfaceToImplicit< N > & | other | ) |
Copy constructor.
◆ SurfaceToImplicit() [3/3]
|
noexcept |
Move constructor.
Member Function Documentation
◆ BoundingBoxLocal()
|
overrideprotectedvirtual |
Returns the bounding box of this surface object in local frame.
Implements CubbyFlow::Surface< N >.
◆ ClosestDistanceLocal()
|
overrideprotectedvirtual |
Returns the closest distance from the given point otherPoint to the point on the surface in local frame.
Reimplemented from CubbyFlow::ImplicitSurface< N >.
◆ ClosestIntersectionLocal()
|
overrideprotectedvirtual |
Returns the closest intersection point for given ray in local frame.
Implements CubbyFlow::Surface< N >.
◆ ClosestNormalLocal()
|
overrideprotectedvirtual |
Returns the normal to the closest point on the surface from the given point otherPoint in local frame.
Implements CubbyFlow::Surface< N >.
◆ ClosestPointLocal()
|
overrideprotectedvirtual |
Returns the closest point from the given point otherPoint to the surface in local frame.
Implements CubbyFlow::Surface< N >.
◆ GetBuilder()
|
static |
Returns builder fox SurfaceToImplicit.
◆ GetSurface()
| std::shared_ptr< Surface< N > > CubbyFlow::SurfaceToImplicit< N >::GetSurface | ( | ) | const |
Returns the raw surface instance.
◆ IntersectsLocal()
|
overrideprotectedvirtual |
Returns true if the given ray intersects with this surface object in local frame.
Reimplemented from CubbyFlow::Surface< N >.
◆ IsBounded()
|
overridevirtual |
Returns true if bounding box can be defined.
Reimplemented from CubbyFlow::Surface< N >.
◆ IsValidGeometry()
|
overridevirtual |
Returns true if the surface is a valid geometry.
Reimplemented from CubbyFlow::Surface< N >.
◆ operator=() [1/2]
| SurfaceToImplicit & CubbyFlow::SurfaceToImplicit< N >::operator= | ( | const SurfaceToImplicit< N > & | other | ) |
Copy assignment operator.
◆ operator=() [2/2]
|
noexcept |
Move assignment operator.
◆ SignedDistanceLocal()
|
overrideprotectedvirtual |
Returns signed distance from the given point otherPoint in local space.
Implements CubbyFlow::ImplicitSurface< N >.
◆ UpdateQueryEngine()
|
overridevirtual |
Updates internal spatial query engine.
Reimplemented from CubbyFlow::Surface< N >.
The documentation for this class was generated from the following file:
- Core/Geometry/SurfaceToImplicit.hpp
Public Member Functions inherited from
1.9.8