Skip to content

AttachProjectiveConstraint

This component belongs to the category of Projective Constraint. The AttachProjectiveConstraint works with a pair of objects, and it projects the degrees of freedom (e.g. position) and their derivatives (e.g. velocity), so that both objects are attached. As being a projective constraint, this projective constraints ensures a geometrical connection between both objects at the end of the time step, but it does not integrate the physics of both object (contrary to Lagrange based constraints).

Note that constraining objects using the data twoWay will project the constraint vertices of both object1 and object2 towards their average degrees of freedom and derivatives:

Deriv corr = (dx2-dx1)*0.5*responseFactor*getConstraintFactor(index);
      dx1 += corr;
      dx2 -= corr;
- if false, the position of the object1 are projected onto the object2. Therefore, object2 only follows object1 without affecting the motion of object1
dx2 = Deriv();

Usage

The AttachProjectiveConstraint requires two MechanicalObjects so that both degrees of freedom can be accessed and projected to the attached configuration. An integration scheme and a solver are also necessary to solve the linear system at each time step.