9 #include "imstkPbdConstraintFunctor.h" 10 #include "imstkMath.h" 12 #include <unordered_map> 17 class PbdConstraintContainer;
18 class PbdBaryPointToPointConstraint;
20 class ProximitySurfaceSelector;
92 std::shared_ptr<PbdObject> pbdObj,
100 std::shared_ptr<PbdObject> pbdObj,
104 std::shared_ptr<PbdObject>
m_objA =
nullptr;
105 std::shared_ptr<PbdObject>
m_objB =
nullptr;
116 std::shared_ptr<PbdObject> addConnectiveTissueConstraints(
117 std::shared_ptr<LineMesh> connectiveLineMesh,
118 std::shared_ptr<PbdObject> objA,
119 std::shared_ptr<PbdObject> objB,
120 std::shared_ptr<PbdModel> model,
122 double distStiffness = 10000000000);
144 std::shared_ptr<PbdObject> makeConnectiveTissue(
145 std::shared_ptr<PbdObject> objA,
146 std::shared_ptr<PbdObject> objB,
147 std::shared_ptr<PbdModel> model,
149 double strandsPerFace,
150 int segmentsPerStrand,
151 std::shared_ptr<ProximitySurfaceSelector> selector,
153 double distStiffness,
154 double allowedAngleDeviation);
156 std::shared_ptr<PbdObject> makeConnectiveTissue(
157 std::shared_ptr<PbdObject> objA,
158 std::shared_ptr<PbdObject> objB,
159 std::shared_ptr<PbdModel> model,
160 double maxDist = 0.0,
161 double strandsPerFace = 1,
162 int segmentsPerStrand = 3,
164 double distStiffness = 1.0e10,
165 double allowedAngleDeviation = PI);
void setConnectedObjB(std::shared_ptr< PbdObject > objB)
Sets PBD object to connect to connective straints assumes the surface mesh of ObjB is coincident with...
std::shared_ptr< PbdObject > m_objA
Organ being connected.
Container for pbd constraints.
void connectLineToTetMesh(std::shared_ptr< PbdObject > pbdObj, PbdConstraintContainer &constraints)
Used to generate connecting constraints when the body being attached uses a tet mesh as the physics m...
void setTolerance(double tolerance)
Get/Set Tolerance for checking coincidence of surface to line mesh.
std::shared_ptr< PbdObject > m_objB
Organ being connected.
std::shared_ptr< PbdObject > m_connectiveStrandObj
Connective tissue that is made.
void setConnectiveStrandObj(std::shared_ptr< PbdObject > connectiveStrandObj)
Sets PBD object that represents the connective tissue. This must use a line mesh for the physics mesh...
double m_distStiffness
Stiffness used for distance constraints.
void setDistStiffness(double stiffness)
Get/Set the stiffness for the distance constraint.
void connectLineToSurfMesh(std::shared_ptr< PbdObject > pbdObj, PbdConstraintContainer &constraints)
Used to generate connecting constraints when the body being attached uses a surface mesh as the physi...
void setConnectedObjA(std::shared_ptr< PbdObject > objA)
Sets PBD object to connect to connective strands assumes the surface mesh of ObjA is coincident with ...
void operator()(PbdConstraintContainer &constraints) override
Appends a set of constraint to the container given a geometry & body.
double m_tolerance
Tolerance for checking coincidence of surface to line mesh.
void generateDistanceConstraints()
Creates distance constraints for the connective strands using the default m_distStiffness value...
Abstract PbdConstraintFunctor that assumes usage of a singular body & geometry.