9 #include "imstkPbdCollisionConstraint.h" 31 Vec3d* prevPtA0, Vec3d* prevPtA1,
32 Vec3d* prevPtB0, Vec3d* prevPtB1,
35 double stiffnessA,
double stiffnessB,
36 int ccdSubsteps = 25);
39 const double dt,
const SolverType& type)
override;
48 double& c, std::vector<Vec3d>& dcdx)
override;
52 std::array<Vec3d*, 2> m_prevEdgeA = {
nullptr,
nullptr };
53 std::array<Vec3d*, 2> m_prevEdgeB = {
nullptr,
nullptr };
54 int m_ccdSubsteps = 25;
The PbdCollisionConstraint implements two sided collision. This allows the usage of differing stiffne...
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...
void initConstraint(Vec3d *prevPtA0, Vec3d *prevPtA1, Vec3d *prevPtB0, Vec3d *prevPtB1, const PbdParticleId &ptA0, const PbdParticleId &ptA1, const PbdParticleId &ptB0, const PbdParticleId &ptB1, double stiffnessA, double stiffnessB, int ccdSubsteps=25)
Initialize constraint.
bool computeValueAndGradient(PbdState &bodies, double &c, std::vector< Vec3d > &dcdx) override
Compute value and gradient of constraint function.
SolverType
Type of solvers.
void projectConstraint(PbdState &bodies, const double dt, const SolverType &type) override
Performs the actual positional solve.
Pushes an edge "outside" the other edge.
Provides interface for accessing particles from a 2d array of PbdBody,Particles.