9 #include "imstkPbdConstraint.h" 30 const double dt,
const SolverType& type)
override;
46 const Vec3d& hingeAxes,
47 const double compliance);
56 double& c, std::vector<Vec3d>& dcdx)
override;
59 Vec3d m_hingeAxes = Vec3d(1.0, 0.0, 0.0);
79 const double compliance);
85 void initConstraintOffset(
89 const double compliance);
95 void initConstraintOffset(
98 const Quatd rotationalOffset,
99 const double compliance);
108 double& c, std::vector<Vec3d>& dcdx)
override;
111 Quatd m_offset = Quatd::Identity();
void projectConstraint(PbdState &bodies, const double dt, const SolverType &type) override
Update positions by projecting constraints.
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...
Applies rotational correction only.
virtual bool computeValueAndGradient(PbdState &bodies, double &c, std::vector< Vec3d > &dcdx)=0
Compute value and gradient of the constraint.
Base Constraint class for Position based dynamics constraints.
SolverType
Type of solvers.
Constraints one orientation to be relative by a given angular distance/offset to another orientation...
Provides interface for accessing particles from a 2d array of PbdBody,Particles.
Constraint a single oriented particle along an axes of rotation Aligns oriented particles up axes to ...