CubbyFlow::ImplicitTriangleMesh3 Class Referencefinal

TriangleMesh3 to ImplicitSurface3 converter. More...

#include <Core/Geometry/ImplicitTriangleMesh3.hpp>

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

Classes

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

Public Member Functions

 ImplicitTriangleMesh3 (TriangleMesh3Ptr mesh, size_t resolutionX=32, double margin=0.2, const Transform3 &_transform=Transform3{}, bool _isNormalFlipped=false)
 Constructs an ImplicitSurface3 with mesh and other grid parameters. More...
 
 ImplicitTriangleMesh3 (const ImplicitTriangleMesh3 &)=default
 Default copy constructor. More...
 
 ImplicitTriangleMesh3 (ImplicitTriangleMesh3 &&) noexcept=default
 Default move constructor. More...
 
 ~ImplicitTriangleMesh3 () override=default
 Default virtual destructor. More...
 
ImplicitTriangleMesh3operator= (const ImplicitTriangleMesh3 &)=default
 Default copy assignment operator. More...
 
ImplicitTriangleMesh3operator= (ImplicitTriangleMesh3 &&) noexcept=default
 Default move assignment operator. More...
 
const VertexCenteredScalarGrid3PtrGetGrid () const
 Returns grid data. 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 fox ImplicitTriangleMesh3. 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::ImplicitSurface< N >
virtual double SignedDistanceLocal (const Vector< double, N > &otherPoint) const =0
 
- Protected Member Functions inherited from CubbyFlow::Surface< N >
virtual Vector< double, N > ClosestPointLocal (const Vector< double, N > &otherPoint) const =0
 
virtual SurfaceRayIntersection< N > ClosestIntersectionLocal (const Ray< double, N > &ray) const =0
 Returns the closest intersection point for given ray in local frame. More...
 
virtual Vector< double, N > ClosestNormalLocal (const Vector< double, N > &otherPoint) const =0
 
virtual bool IntersectsLocal (const Ray< double, N > &ray) const
 
virtual bool IsInsideLocal (const Vector< double, N > &otherPoint) const
 

Detailed Description

TriangleMesh3 to ImplicitSurface3 converter.

This class builds signed-distance field for given TriangleMesh3 instance so that it can be used as an ImplicitSurface3 instance. The mesh is discretized into a regular grid and the signed-distance is measured at each grid point. Thus, there is a sampling error and its magnitude depends on the grid resolution.

Constructor & Destructor Documentation

◆ ImplicitTriangleMesh3() [1/3]

CubbyFlow::ImplicitTriangleMesh3::ImplicitTriangleMesh3 ( TriangleMesh3Ptr  mesh,
size_t  resolutionX = 32,
double  margin = 0.2,
const Transform3 _transform = Transform3{},
bool  _isNormalFlipped = false 
)
explicit

Constructs an ImplicitSurface3 with mesh and other grid parameters.

◆ ImplicitTriangleMesh3() [2/3]

CubbyFlow::ImplicitTriangleMesh3::ImplicitTriangleMesh3 ( const ImplicitTriangleMesh3 )
default

Default copy constructor.

◆ ImplicitTriangleMesh3() [3/3]

CubbyFlow::ImplicitTriangleMesh3::ImplicitTriangleMesh3 ( ImplicitTriangleMesh3 &&  )
defaultnoexcept

Default move constructor.

◆ ~ImplicitTriangleMesh3()

CubbyFlow::ImplicitTriangleMesh3::~ImplicitTriangleMesh3 ( )
overridedefault

Default virtual destructor.

Member Function Documentation

◆ GetBuilder()

static Builder CubbyFlow::ImplicitTriangleMesh3::GetBuilder ( )
static

Returns builder fox ImplicitTriangleMesh3.

◆ GetGrid()

const VertexCenteredScalarGrid3Ptr& CubbyFlow::ImplicitTriangleMesh3::GetGrid ( ) const

Returns grid data.

◆ operator=() [1/2]

ImplicitTriangleMesh3& CubbyFlow::ImplicitTriangleMesh3::operator= ( const ImplicitTriangleMesh3 )
default

Default copy assignment operator.

◆ operator=() [2/2]

ImplicitTriangleMesh3& CubbyFlow::ImplicitTriangleMesh3::operator= ( ImplicitTriangleMesh3 &&  )
defaultnoexcept

Default move assignment operator.


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