9 #include "imstkCollisionInteraction.h" 10 #include "imstkMacros.h" 28 PbdObjectCollision(std::shared_ptr<PbdObject> obj1, std::shared_ptr<CollidingObject> obj2,
29 std::string cdType =
"");
40 double getRestitution()
const;
48 double getFriction()
const;
56 void setUseCorrectVelocity(
const bool useCorrectVelocity);
65 double getRigidBodyCompliance()
const;
74 double getDeformableStiffnessA()
const;
75 void setDeformableStiffnessB(
const double stiffness);
76 double getDeformableStiffnessB()
const;
82 void initGraphEdges(std::shared_ptr<TaskNode> source, std::shared_ptr<TaskNode> sink)
override;
85 std::shared_ptr<TaskNode> m_updatePrevGeometryCCDNode =
nullptr;
89 void setupConnections(std::shared_ptr<PbdObject> obj1, std::shared_ptr<CollidingObject> obj2,
90 std::string cdType =
"");
void setRigidBodyCompliance(const double compliance)
Get/Set compliance of rigid body contacts. Defaults to 0 compliance/infinitely stiff. This is what is needed most of the time but sometimes making a contact a bit softer can be helpful.
bool getUseCorrectVelocity() const
Get/Set whether velocity is corrected (in some cases this could cause instabilities) ...
void setDeformableStiffnessA(const double stiffness)
Get/Set stiffness of deformable contacts. Defaults to 1.0. This is what is needed most of the time bu...
PbdObjectCollision(std::shared_ptr< PbdObject > obj1, std::shared_ptr< CollidingObject > obj2, std::string cdType="")
Constructor for PbdObject-PbdObject or PbdObject-CollidingObject collisions.
Abstract class for defining collision interactions between objects.
This class defines a collision interaction between two PbdObjects or PbdObject & CollidingObject.
void setFriction(const double friction)
Get/Set the friction, which gives how much velocity is removed along the tangents during contact...
void setRestitution(const double restitution)
Get/Set the restitution, which gives how much velocity is removed along the contact normals during co...
void initGraphEdges()
Initializes the edges of the SceneObject's computational graph.