iMSTK
Interactive Medical Simulation Toolkit
|
Implements penalty collision handling between Fem and Rigid models. More...
#include <imstkPenaltyCH.h>
Public Member Functions | |
void | setInputFeObject (std::shared_ptr< FeDeformableObject > feObj) |
void | setInputRbdObject (std::shared_ptr< RigidObject2 > rbdObj) |
std::shared_ptr< FeDeformableObject > | getInputFeObject () |
std::shared_ptr< RigidObject2 > | getInputRbdObject () |
void | setContactStiffness (const double stiffness) |
Set the contact stiffness. | |
void | setContactVelocityDamping (const double damping) |
Set the contact velocity damping. | |
![]() | |
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< CollidingObject > | getInputObjectA () const |
Get the input objects. | |
std::shared_ptr< CollidingObject > | getInputObjectB () const |
virtual std::shared_ptr< Geometry > | getHandlingGeometryA () |
Get the geometry used for handling defaults to the collision geometry. | |
virtual std::shared_ptr< Geometry > | getHandlingGeometryB () |
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 CollisionData > | getInputCollisionData () const |
void | update () |
Handle the input collision data. | |
Protected Member Functions | |
void | handle (const std::vector< CollisionElement > &elementsA, const std::vector< CollisionElement > &elementsB) override |
Handle the input collision data. Elements will be flipped (if needed) such that elementsA corresponds with inputObjectA and B with inputObjectB in the case CD is backwards from CH. More... | |
void | computeContactForcesAnalyticRigid (const std::vector< CollisionElement > &elements, std::shared_ptr< RigidObject2 > analyticObj) |
Given the collision data, applies contact as external force to the rigid body (onyl supports PointDirection contacts) | |
void | computeContactForcesDiscreteDeformable (const std::vector< CollisionElement > &elements, std::shared_ptr< FeDeformableObject > deformableObj) |
Given the collision data, applies nodal forces in the FEM model. | |
![]() | |
void | updateCollisionData (std::shared_ptr< const CollisionData > data) |
Protected Attributes | |
double | m_stiffness = 5.0e5 |
Stiffness of contact. | |
double | m_damping = 0.5 |
Damping of the contact. | |
![]() | |
std::shared_ptr< CollidingObject > | m_inputObjectA |
std::shared_ptr< CollidingObject > | m_inputObjectB |
std::shared_ptr< const CollisionData > | m_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 |
Implements penalty collision handling between Fem and Rigid models.
Definition at line 24 of file imstkPenaltyCH.h.
|
overrideprotectedvirtual |
Handle the input collision data. Elements will be flipped (if needed) such that elementsA corresponds with inputObjectA and B with inputObjectB in the case CD is backwards from CH.
CD | elements to resolve geomA |
CD | elements to resolve geomB |
Implements imstk::CollisionHandling.
Definition at line 42 of file imstkPenaltyCH.cpp.