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

Implements bone drilling collision handling. More...

#include <imstkBoneDrillingCH.h>

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

Public Member Functions

void setInputObjectBone (std::shared_ptr< CollidingObject > boneObject)
 Set the input bone.
 
void setInputObjectDrill (std::shared_ptr< RigidObject2 > drillObject)
 Set the input drill.
 
std::shared_ptr< CollidingObjectgetBoneObj () const
 
std::shared_ptr< RigidObject2getDrillObj () const
 
double getStiffness () const
 Get stiffness.
 
void setStiffness (const double k)
 Set stiffness.
 
double getDamping () const
 Get damping coefficient.
 
void setDamping (const double d)
 Set damping coefficient.
 
- Public Member Functions inherited from imstk::CollisionHandling
virtual const std::string getTypeName () const =0
 
void setInputObjectA (std::shared_ptr< CollidingObject > objectA)
 Set the input objects.
 
void setInputObjectB (std::shared_ptr< CollidingObject > objectB)
 
std::shared_ptr< CollidingObjectgetInputObjectA () const
 Get the input objects.
 
std::shared_ptr< CollidingObjectgetInputObjectB () const
 
virtual std::shared_ptr< GeometrygetHandlingGeometryA ()
 Get the geometry used for handling defaults to the collision geometry.
 
virtual std::shared_ptr< GeometrygetHandlingGeometryB ()
 
void setInputCollisionData (std::shared_ptr< CollisionData > collisionData)
 Set/Get the input collision data used for handling.
 
void setInputCollisionData (std::shared_ptr< std::vector< std::shared_ptr< CollisionData >>> collisionVectorData)
 Set/Get the input collision data used for handling This supports collating information from multiple collision detect algorithms.
 
std::shared_ptr< const CollisionDatagetInputCollisionData () const
 
void update ()
 Handle the input collision data.
 

Protected Member Functions

virtual void handle (const std::vector< CollisionElement > &elementsA, const std::vector< CollisionElement > &elementsB) override
 Does the bone drilling.
 
void erodeBone (const std::vector< CollisionElement > &elementsA, const std::vector< CollisionElement > &elementsB)
 Decrease the density at the nodal points and remove if the density goes below 0. More...
 
- Protected Member Functions inherited from imstk::CollisionHandling
void updateCollisionData (std::shared_ptr< const CollisionData > data)
 

Additional Inherited Members

- Protected Attributes inherited from imstk::CollisionHandling
std::shared_ptr< CollidingObjectm_inputObjectA
 
std::shared_ptr< CollidingObjectm_inputObjectB
 
std::shared_ptr< const CollisionDatam_colData
 Collision data.
 
std::shared_ptr< std::vector< std::shared_ptr< CollisionData > > > m_colVectorData
 Expansion to allow collision detection to return multiple types of collision data.
 
std::function< void()> m_updateFunction = []() {}
 
bool m_clearData = true
 
bool m_processConstraints = true
 

Detailed Description

Implements bone drilling collision handling.

Todo:
: Doesn't work right now. Tet removal needs to be fixed. I would suggest buffering setting removed elements to a dummy vertex.

Definition at line 26 of file imstkBoneDrillingCH.h.

Member Function Documentation

◆ erodeBone()

void imstk::BoneDrillingCH::erodeBone ( const std::vector< CollisionElement > &  elementsA,
const std::vector< CollisionElement > &  elementsB 
)
protected

Decrease the density at the nodal points and remove if the density goes below 0.

Todo:
Unused variable, maybe used in furture?

Definition at line 30 of file imstkBoneDrillingCH.cpp.

Here is the caller graph for this function:

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