use of artisynth.core.mechmodels.MechSystem.ConstraintInfo in project artisynth_core by artisynth.
the class ParticleConstraintBase method getUnilateralInfo.
public int getUnilateralInfo(ConstraintInfo[] ninfo, int idx) {
if (myUnilateralP) {
for (int i = 0; i < myParticleInfo.size(); i++) {
ParticleInfo pi = myParticleInfo.get(i);
if (pi.myEngagedP && pi.myPart.getSolveIndex() != -1) {
ConstraintInfo gi = ninfo[idx++];
gi.dist = pi.myDist;
gi.compliance = myCompliance;
gi.damping = myDamping;
gi.force = 0;
}
}
}
return idx;
}
use of artisynth.core.mechmodels.MechSystem.ConstraintInfo in project artisynth_core by artisynth.
the class BodyConnector method getBilateralInfo.
public int getBilateralInfo(ConstraintInfo[] ginfo, int idx) {
int nc = numBilateralConstraints();
if (nc > 0) {
if (nc != myBilaterals.size()) {
throw new InternalErrorException("nc=" + nc + " bilaterals.size()=" + myBilaterals.size());
}
for (int j = 0; j < nc; j++) {
RigidBodyConstraint bc = myBilaterals.get(j);
ConstraintInfo gi = ginfo[idx++];
gi.dist = bc.getDistance();
gi.compliance = bc.getCompliance();
gi.damping = bc.getDamping();
gi.force = 0;
}
}
return idx;
}
Aggregations