9 #include "imstkPbdRigidObjectCollision.h" 10 #include "imstkRigidObject2.h" 11 #include "imstkStraightNeedle.h" 12 #include "NeedlePbdCH.h" 13 #include "NeedleRigidBodyCH.h" 15 using namespace imstk;
26 std::shared_ptr<RigidObject2> needleObj,
30 <<
"NeedleInteraction only works with objects that have a StraightNeedle component";
32 <<
"NeedleInteraction only works with objects that have a Puncturable component";
34 auto needleRbdCH = std::make_shared<NeedleRigidBodyCH>();
35 needleRbdCH->setInputRigidObjectA(needleObj);
36 needleRbdCH->setInputCollidingObjectB(tissueObj);
37 needleRbdCH->setInputCollisionData(getCollisionDetection()->getCollisionData());
38 needleRbdCH->setBaumgarteStabilization(0.001);
41 auto needlePbdCH = std::make_shared<NeedlePbdCH>();
42 needlePbdCH->setInputObjectA(tissueObj);
43 needlePbdCH->setInputObjectB(needleObj);
44 needlePbdCH->setInputCollisionData(getCollisionDetection()->getCollisionData());
46 needlePbdCH->setDeformableStiffnessA(1.0);
47 needlePbdCH->setDeformableStiffnessB(0.01);
This class defines a collision interaction between a first order PbdObject and second order RigidObje...
Defines interaction between NeedleObject and PbdObject.
void setCollisionHandlingB(std::shared_ptr< CollisionHandling > colHandlingB)
Set the Collision Handling for object B.
Place this on an object to make it puncturable by a needle. This allows puncturables to know they've ...
Definition of straight, single segment needle.
void setCollisionHandlingA(std::shared_ptr< CollisionHandling > colHandlingA)
Set the Collision Handling for object A.