| iMSTK
    Interactive Medical Simulation Toolkit | 
Creates rigid body contact and frictional constraints given collision data then adds them to the rigid body model, if rigid objects use differing models, one-way contacts are added to both. If only one rigid object is given, one-ways are used. More...
#include <imstkRigidBodyCH.h>


| Public Member Functions | |
| void | setInputRigidObjectA (std::shared_ptr< RigidObject2 > rbdObjA) | 
| void | setInputRigidObjectB (std::shared_ptr< RigidObject2 > rbdObjB) | 
| Second input rigid object is optional. | |
| void | setInputCollidingObjectB (std::shared_ptr< CollidingObject > colObjB) | 
| Second input colliding object is optional. | |
| std::shared_ptr< RigidObject2 > | getRigidObjA () | 
| std::shared_ptr< RigidObject2 > | getRigidObjB () | 
| void | setBaumgarteStabilization (double beta) | 
| Baumgarte stabilization term, scales the constraint scalars The higher it is, the faster constraint violations are dealt with (bigger steps), but could introduce erroneous velocity. | |
| const double | getBeta () const | 
| void | setFriction (double frictionalCoefficient) | 
| const double | getFriction () const | 
| void | setUseFriction (bool useFriction) | 
| const double | getUseFriction () const | 
|  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< 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 | |
| virtual void | handle (const std::vector< CollisionElement > &elementsA, const std::vector< CollisionElement > &elementsB) override | 
| Add rigid body constraints according to contacts. | |
| void | handleRbdRbdTwoWay (std::shared_ptr< RigidObject2 > rbdObjA, std::shared_ptr< RigidObject2 > rbdObjB, const std::vector< CollisionElement > &elementsA, const std::vector< CollisionElement > &elementsB) | 
| Handle rigid vs rigid two-way edge-edge, vertex-triangle, etc. | |
| void | handleRbdStaticOneWay (std::shared_ptr< RigidObject2 > rbdObj, std::shared_ptr< CollidingObject > colObj, const std::vector< CollisionElement > &elementsA, const std::vector< CollisionElement > &elementsB) | 
| Handle rigid vs static one-way edge-edge, vertex-triangle, etc. | |
| virtual void | addConstraint (std::shared_ptr< RigidObject2 > rbdObj, const Vec3d &contactPt, const Vec3d &contactNormal, const double contactDepth) | 
| Add constraint for the rigid body given contact. | |
| virtual void | addConstraint (std::shared_ptr< RigidObject2 > rbdObjA, std::shared_ptr< RigidObject2 > rbdObjB, const Vec3d &contactPt, const Vec3d &contactNormal, const double contactDepth) | 
| Add two-way constraint for the rigid bodies given contact. | |
|  Protected Member Functions inherited from imstk::CollisionHandling | |
| void | updateCollisionData (std::shared_ptr< const CollisionData > data) | 
| Protected Attributes | |
| double | m_beta = 0.0 | 
| double | m_frictionalCoefficient = 2.0 | 
| bool | m_useFriction = false | 
|  Protected Attributes inherited from imstk::CollisionHandling | |
| 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 | 
Creates rigid body contact and frictional constraints given collision data then adds them to the rigid body model, if rigid objects use differing models, one-way contacts are added to both. If only one rigid object is given, one-ways are used.
Definition at line 27 of file imstkRigidBodyCH.h.
 1.8.13
 1.8.13