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

ImplicitGeometry to PointSet continous collision detection. This CD method marches along the displacement of the points in the pointset to converge on the zero crossing of the implicit geometry. This particular version is suited for levelsets not SDFs as it caches the history of the contact to avoid sampling the implicit geometry anywhere but at the surface (it will also work for SDFs, though better alterations/modifications of this exist for SDFs) More...

#include <imstkImplicitGeometryToPointSetCCD.h>

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

Protected Member Functions

void setupFunctions (std::shared_ptr< ImplicitGeometry > implicitGeom, std::shared_ptr< PointSet > pointSet)
 
void computeCollisionDataAB (std::shared_ptr< Geometry > geomA, std::shared_ptr< Geometry > geomB, std::vector< CollisionElement > &elementsA, std::vector< CollisionElement > &elementsB) override
 Compute collision data for AB simultaneously.
 
void computeCollisionDataA (std::shared_ptr< Geometry > geomA, std::shared_ptr< Geometry > geomB, std::vector< CollisionElement > &elementsA) override
 Compute collision data for side A.
 
void computeCollisionDataB (std::shared_ptr< Geometry > geomA, std::shared_ptr< Geometry > geomB, std::vector< CollisionElement > &elementsB) override
 Compute collision data for side B.
 
- Protected Member Functions inherited from imstk::CollisionDetectionAlgorithm
virtual bool areInputsValid () override
 Check inputs are correct (always works reversibly) More...
 
virtual void requestUpdate () override
 Compute the collision data.
 
virtual void computeCollisionDataA (std::shared_ptr< Geometry > imstkNotUsed(geomA), std::shared_ptr< Geometry > imstkNotUsed(geomB), std::vector< CollisionElement > &imstkNotUsed(elementsA))
 Compute collision data for side A (implement as if flip=true)
 
virtual void computeCollisionDataB (std::shared_ptr< Geometry > imstkNotUsed(geomA), std::shared_ptr< Geometry > imstkNotUsed(geomB), std::vector< CollisionElement > &imstkNotUsed(elementsB))
 Compute collision data for side B (implement as if flip=true)
 
- 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.
 
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)
 

Additional Inherited Members

- Public Member Functions inherited from imstk::CollisionDetectionAlgorithm
virtual const std::string getTypeName () const =0
 Returns collision detection type string name.
 
const std::shared_ptr< CollisionDatagetCollisionData () const
 Returns output collision data.
 
const std::shared_ptr< CollisionDatagetCollisionData (int i) const
 
const std::shared_ptr< std::vector< std::shared_ptr< CollisionData > > > & getCollisionDataVector () const
 
size_t getCollisionDataVectorSize () const
 
void setGenerateCD (const bool generateA, const bool generateB)
 If generateA is false, CD data will not be generated for input0,A Similarly, if generateB is false, CD data will not be generated for input1,B.
 
void setInputGeometryA (std::shared_ptr< Geometry > geometryA)
 
void setInputGeometryB (std::shared_ptr< Geometry > geometryB)
 
- 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 Types inherited from imstk::GeometryAlgorithm
using GeometryCheck = std::function< bool(Geometry *)>
 
using TypeCheckContainer = std::unordered_map< size_t, GeometryCheck >
 
- Protected Attributes inherited from imstk::CollisionDetectionAlgorithm
std::shared_ptr< std::vector< std::shared_ptr< CollisionData > > > m_collisionDataVector
 
bool m_flipOutput = false
 
bool m_generateCD_A = true
 
bool m_generateCD_B = true
 
bool m_computeColDataAImplemented = true
 
bool m_computeColDataBImplemented = true
 
- Protected Attributes inherited from imstk::GeometryAlgorithm
TypeCheckContainer m_requiredTypeChecks
 
TypeCheckContainer m_optionalTypeChecks
 

Detailed Description

ImplicitGeometry to PointSet continous collision detection. This CD method marches along the displacement of the points in the pointset to converge on the zero crossing of the implicit geometry. This particular version is suited for levelsets not SDFs as it caches the history of the contact to avoid sampling the implicit geometry anywhere but at the surface (it will also work for SDFs, though better alterations/modifications of this exist for SDFs)

Definition at line 30 of file imstkImplicitGeometryToPointSetCCD.h.


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