CubbyFlow::CustomImplicitSurface< N > Class Template Referencefinal

Custom N-D implicit surface using arbitrary function. More...

#include <Core/Geometry/CustomImplicitSurface.hpp>

Inheritance diagram for CubbyFlow::CustomImplicitSurface< N >:
CubbyFlow::ImplicitSurface< N > CubbyFlow::Surface< N >

Classes

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

Public Member Functions

 CustomImplicitSurface (std::function< double(const Vector< double, N > &)> func, const BoundingBox< double, N > &domain=BoundingBox< double, N >{}, double resolution=1e-3, double rayMarchingResolution=1e-6, unsigned int maxNumOfIterations=5, const Transform< N > &_transform=Transform< N >{}, bool _isNormalFlipped=false)
 
 ~CustomImplicitSurface () override=default
 Default virtual destructor. More...
 
 CustomImplicitSurface (const CustomImplicitSurface &other)=default
 Default copy constructor. More...
 
 CustomImplicitSurface (CustomImplicitSurface &&other) noexcept=default
 Default move constructor. More...
 
CustomImplicitSurfaceoperator= (const CustomImplicitSurface &other)=default
 Default copy assignment operator. More...
 
CustomImplicitSurfaceoperator= (CustomImplicitSurface &&other) noexcept=default
 Default move assignment operator. More...
 
- 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. More...
 
 ~ImplicitSurface () override=default
 Default virtual destructor. More...
 
 ImplicitSurface (const ImplicitSurface &other)
 Copy constructor. More...
 
 ImplicitSurface (ImplicitSurface &&other) noexcept
 Move constructor. More...
 
ImplicitSurfaceoperator= (const ImplicitSurface &other)
 Copy assignment operator. More...
 
ImplicitSurfaceoperator= (ImplicitSurface &&other) noexcept
 Move assignment operator. More...
 
double SignedDistance (const Vector< double, N > &otherPoint) const
 Returns signed distance from the given point otherPoint. More...
 
- Public Member Functions inherited from CubbyFlow::Surface< N >
 Surface (const Transform< N > &transform=Transform< N >(), bool isNormalFlipped=false)
 Constructs a surface with normal direction. More...
 
virtual ~Surface ()=default
 Default virtual destructor. More...
 
 Surface (const Surface &other)
 Copy constructor. More...
 
 Surface (Surface &&other) noexcept
 Move constructor. More...
 
Surfaceoperator= (const Surface &other)
 Copy assignment operator. More...
 
Surfaceoperator= (Surface &&other) noexcept
 Move assignment operator. More...
 
Vector< double, N > ClosestPoint (const Vector< double, N > &otherPoint) const
 
BoundingBox< double, N > GetBoundingBox () const
 Returns the bounding box of this surface object. More...
 
bool Intersects (const Ray< double, N > &ray) const
 Returns true if the given ray intersects with this surface object. More...
 
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. More...
 
Vector< double, N > ClosestNormal (const Vector< double, N > &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 Vector< double, N > &otherPoint) const
 

Static Public Member Functions

static Builder GetBuilder ()
 Returns builder for CustomImplicitSurface. More...
 

Additional Inherited Members

- Public Attributes inherited from CubbyFlow::Surface< N >
Transform< N > transform
 Local-to-world transform. More...
 
bool isNormalFlipped = false
 Flips normal. More...
 
- Protected Member Functions inherited from CubbyFlow::Surface< N >
virtual bool IsInsideLocal (const Vector< double, N > &otherPoint) const
 

Detailed Description

template<size_t N>
class CubbyFlow::CustomImplicitSurface< N >

Custom N-D implicit surface using arbitrary function.

Constructor & Destructor Documentation

◆ CustomImplicitSurface() [1/3]

template<size_t N>
CubbyFlow::CustomImplicitSurface< N >::CustomImplicitSurface ( std::function< double(const Vector< double, N > &)>  func,
const BoundingBox< double, N > &  domain = BoundingBox< double, N >{},
double  resolution = 1e-3,
double  rayMarchingResolution = 1e-6,
unsigned int  maxNumOfIterations = 5,
const Transform< N > &  _transform = Transform< N >{},
bool  _isNormalFlipped = false 
)

Constructs an implicit surface using the given signed-distance function.

Parameters
funcCustom SDF function object.
domainBounding box of the SDF if exists.
resolutionFinite differencing resolution for derivatives.
rayMarchingResolutionRay marching resolution for ray tests.
maxNumOfIterationsNumber of iterations for closest point search.
_transformLocal-to-world transform.
_isNormalFlippedTrue if normal is flipped.

◆ ~CustomImplicitSurface()

template<size_t N>
CubbyFlow::CustomImplicitSurface< N >::~CustomImplicitSurface ( )
overridedefault

Default virtual destructor.

◆ CustomImplicitSurface() [2/3]

template<size_t N>
CubbyFlow::CustomImplicitSurface< N >::CustomImplicitSurface ( const CustomImplicitSurface< N > &  other)
default

Default copy constructor.

◆ CustomImplicitSurface() [3/3]

template<size_t N>
CubbyFlow::CustomImplicitSurface< N >::CustomImplicitSurface ( CustomImplicitSurface< N > &&  other)
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ GetBuilder()

template<size_t N>
static Builder CubbyFlow::CustomImplicitSurface< N >::GetBuilder ( )
static

Returns builder for CustomImplicitSurface.

◆ operator=() [1/2]

template<size_t N>
CustomImplicitSurface& CubbyFlow::CustomImplicitSurface< N >::operator= ( const CustomImplicitSurface< N > &  other)
default

Default copy assignment operator.

◆ operator=() [2/2]

template<size_t N>
CustomImplicitSurface& CubbyFlow::CustomImplicitSurface< N >::operator= ( CustomImplicitSurface< N > &&  other)
defaultnoexcept

Default move assignment operator.


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