9 #include "imstkPbdContactConstraint.h" 38 const double compliance = 0.0);
47 double& c, std::vector<Vec3d>& dcdx)
override;
51 const Vec3d& getIntersectionPoint()
const {
return m_iPt; }
52 Vec3d* getP()
const {
return m_p; }
53 Vec3d* getQ()
const {
return m_q; }
57 Vec3d m_uvw = Vec3d::Zero();
59 Vec2d m_uv = Vec2d::Zero();
73 double m_normalFriction = 0.0;
std::pair< int, int > PbdParticleId
Index pair that refers to a particle in a PbdState. Index 0 is the body id, Index 1 is the particle i...
bool computeValueAndGradient(PbdState &bodies, double &c, std::vector< Vec3d > &dcdx) override
Compute value and gradient of the constraint.
Vec3d computeInterpolantDifference(const PbdState &bodies) const
Given two interpolants on the two elements, compute the difference between them and use for resolutio...
void initConstraint(PbdState &bodies, const PbdParticleId &ptA1, const PbdParticleId &ptB1, const PbdParticleId &ptB2, const PbdParticleId &ptB3, Vec3d *p, Vec3d *q, const double compliance=0.0)
Initializes both PBD and RBD constraint.
Constrains a rigid body line segment defined via p and q to a "puncture" point defined via barycentri...
Provides interface for accessing particles from a 2d array of PbdBody,Particles.
A constraint on a rigid body that defines rotationl correction through dx applied at a local position...