9 #include "imstkSurfaceMesh.h" 11 #include <unordered_map> 26 using namespace imstk;
33 std::shared_ptr<PbdObject> obj;
37 std::shared_ptr<TetrahedralMesh> geom;
38 std::shared_ptr<VecDataArray<double, 3>> verticesPtr;
40 std::shared_ptr<VecDataArray<int, 4>> indicesPtr;
45 std::shared_ptr<PbdObject> obj;
49 std::shared_ptr<StraightNeedle> needle;
50 std::shared_ptr<VecDataArray<double, 3>> verticesPtr;
52 std::shared_ptr<VecDataArray<int, 2>> cellsPtr;
65 void setTissueObject(std::shared_ptr<PbdObject> tissueObject) { m_tissueObject = tissueObject; }
66 std::shared_ptr<PbdObject> getTissueObject()
const {
return m_tissueObject; }
67 void setNeedleObject(std::shared_ptr<PbdObject> needleObject) { m_needleObject = needleObject; }
68 std::shared_ptr<PbdObject> getNeedleObject()
const {
return m_needleObject; }
70 void setCollisionData(std::shared_ptr<CollisionData> cdData) { m_cdData = cdData; }
71 void setCollisionHandleNode(std::shared_ptr<TaskNode> pbdCHNode) { m_pbdCHNode = pbdCHNode; }
73 void setFriction(
const double friction) { m_friction = friction; }
74 double getFriction()
const {
return m_friction; }
76 void setCompliance(
const double compliance) { m_compliance = compliance; }
77 double getCompliance()
const {
return m_compliance; }
79 void setStaticFrictionForceThreshold(
const double force) { m_staticFrictionForceThreshold = force; }
80 const double getStaticFrictionForceThreshold()
const {
return m_staticFrictionForceThreshold; }
82 void setPunctureForceThreshold(
const double forceThreshold) { m_forceThreshold = forceThreshold; }
83 const double getPunctureForceThreshold()
const {
return m_forceThreshold; }
95 virtual void addFaceEmbeddingConstraint(
98 int v1,
int v2,
int v3,
102 std::shared_ptr<PbdObject> m_tissueObject =
nullptr;
103 std::shared_ptr<PbdObject> m_needleObject =
nullptr;
105 std::shared_ptr<TaskNode> m_pbdCHNode =
nullptr;
106 std::shared_ptr<CollisionData> m_cdData =
nullptr;
109 std::unordered_map<TriCell, std::shared_ptr<EmbeddingConstraint>> m_faceConstraints;
112 double m_friction = 0.0;
113 double m_compliance = 0.000001;
114 double m_staticFrictionForceThreshold = 0.0;
115 double m_forceThreshold = 10.0;
122 std::vector<Vec3i> m_debugEmbeddedTriangles;
Base class for TaskGraph nodes.
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.
std::vector< PbdConstraint * > m_constraints
List of PBD constraints.
Implements PBD embedded tissue handling for when the needle is embedded in the tissue.
Represents a set of tetrahedrons & vertices via an array of Vec3d double vertices & Vec4i integer ind...
Base class for all volume mesh types.
Base class for scene objects that move and/or deform under position based dynamics formulation...
Constrains a rigid body line segment defined via p and q to a "puncture" point defined via barycentri...
Base Constraint class for Position based dynamics constraints.
Describes the contact manifold between two geometries.
std::vector< Vec3d > m_debugEmbeddingPoints
Used for debug visualization.
Flattened out with reference members.