iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
imstk::PointToTetMap Class Reference

Computes and applies the PointSet-Tetrahedra map. Vertices of the child geometry are deformed according to the deformation of the tetrahedron they are located in. If they are not within one, nearest tet is used. More...

#include <imstkPointToTetMap.h>

Inheritance diagram for imstk::PointToTetMap:
Inheritance graph
[legend]
Collaboration diagram for imstk::PointToTetMap:
Collaboration graph
[legend]

Public Member Functions

 PointToTetMap (std::shared_ptr< Geometry > parent, std::shared_ptr< Geometry > child)
 
void compute () override
 Compute the tetra-triangle mesh map.
 
- Public Member Functions inherited from imstk::GeometryMap
virtual const std::string getTypeName () const =0
 Returns the string class name. More...
 
void setParentGeometry (std::shared_ptr< Geometry > parent)
 Get/Set parent geometry.
 
std::shared_ptr< GeometrygetParentGeometry () const
 
void setChildGeometry (std::shared_ptr< Geometry > child)
 Get/Set child geometry.
 
std::shared_ptr< GeometrygetChildGeometry () const
 
- Public Member Functions inherited from imstk::GeometryAlgorithm
std::shared_ptr< GeometrygetInput (size_t port=0) const
 Returns input geometry given port, returns nullptr if doesn't exist.
 
std::shared_ptr< GeometrygetOutput (size_t port=0) const
 Returns output geometry given port, returns nullptr if doesn't exist.
 
void setInput (std::shared_ptr< Geometry > inputGeometry, size_t port=0)
 Set the input at the port.
 
void update ()
 Do the actual algorithm.
 

Protected Member Functions

void requestUpdate () override
 Apply (if active) the tetra-triangle mesh map.
 
int findEnclosingTetrahedron (const Vec3d &pos) const
 Find the tetrahedron that encloses a given point in 3D space.
 
void updateBoundingBox ()
 Update bounding box of each tetrahedra of the mesh.
 
int findClosestTetrahedron (const Vec3d &pos) const
 Find the closest tetrahedron based on the distance to their centroids for a given point in 3D space.
 
- Protected Member Functions inherited from imstk::GeometryAlgorithm
void setOutput (std::shared_ptr< Geometry > inputGeometry, const size_t port=0)
 Set the output at the port.
 
template<typename T >
void setRequiredInputType (const size_t port)
 Declares the type for the port with the given number, also defines that the give port is required for the filter to run correctly.
 
template<typename T >
void setOptionalInputType (const size_t port)
 Declares the type for the port with the given number, the data for this port is optional and may be omitted.
 
virtual bool areInputsValid ()
 Check inputs are correct. More...
 
void setNumInputPorts (const size_t numPorts)
 Get/Set the amount of input ports.
 
 imstkGetMacro (NumInputPorts, size_t)
 
void setNumOutputPorts (const size_t numPorts)
 Get/Set the amount of output ports.
 
 imstkGetMacro (NumOutputPorts, size_t)
 

Protected Attributes

std::vector< Vec4d > m_verticesWeights
 weights
 
std::vector< int > m_verticesEnclosingTetraId
 Enclosing tetrahedra to interpolate the weights upon.
 
std::vector< Vec3d > m_bBoxMin
 
std::vector< Vec3d > m_bBoxMax
 
bool m_boundingBoxAvailable
 
- Protected Attributes inherited from imstk::GeometryAlgorithm
TypeCheckContainer m_requiredTypeChecks
 
TypeCheckContainer m_optionalTypeChecks
 

Additional Inherited Members

- Protected Types inherited from imstk::GeometryAlgorithm
using GeometryCheck = std::function< bool(Geometry *)>
 
using TypeCheckContainer = std::unordered_map< size_t, GeometryCheck >
 

Detailed Description

Computes and applies the PointSet-Tetrahedra map. Vertices of the child geometry are deformed according to the deformation of the tetrahedron they are located in. If they are not within one, nearest tet is used.

Definition at line 24 of file imstkPointToTetMap.h.


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