iMSTK
Interactive Medical Simulation Toolkit
|
Applies impulses to the leveset given point direction collision data propotional to the force on the rigid object. More...
#include <imstkLevelSetCH.h>
Public Member Functions | |
void | setInputLvlSetObj (std::shared_ptr< LevelSetDeformableObject > lvlSetObj) |
void | setInputRigidObj (std::shared_ptr< RigidObject2 > rbdObj) |
std::shared_ptr< LevelSetDeformableObject > | getLvlSetObj () |
std::shared_ptr< RigidObject2 > | getRigidObj () |
void | addPoint (int id) |
Adds point to the mask allowing it to apply an impulse to the levelset. | |
void | maskAllPoints () |
Allow all points to effect the levelset. | |
void | unmaskAllPoints () |
Unmask all points. | |
double | getLevelSetVelocityScaling () const |
Set/Get Scale of the velocity used for the levelset, default 0.1. | |
void | setLevelSetVelocityScaling (const double velocityScaling) |
void | setUseProportionalVelocity (const bool useProportionalForce) |
Set/Get whether the velocity used on the levelset should be proportional to the force of the rigid body along the normal of the levelset. | |
bool | getUseProportionalVelocity () const |
void | setKernel (const int size, const double sigma=1.0) |
Set/Get the size + sigma of gaussian kernel used to apply impulse in levelset. | |
int | getKernelSize () const |
double | getKernelSigma () const |
![]() | |
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 |
Compute forces and velocities based on collision data. | |
![]() | |
void | updateCollisionData (std::shared_ptr< const CollisionData > data) |
Protected Attributes | |
std::unordered_set< int > | m_ptIdMask |
double | m_velocityScaling = 0.1 |
bool | m_useProportionalForce = false |
int | m_kernelSize = 3 |
double | m_kernelSigma = 1.0 |
double * | m_kernelWeights = nullptr |
![]() | |
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 |
Applies impulses to the leveset given point direction collision data propotional to the force on the rigid object.
Definition at line 27 of file imstkLevelSetCH.h.