internal override bool SolvePositionConstraints(float baumgarte)
{
float linearError = 0.0f;
Body b1 = _body1;
Body b2 = _body2;
float coordinate1, coordinate2;
if (_revolute1 != null)
{
coordinate1 = _revolute1.JointAngle;
}
else
{
coordinate1 = _prismatic1.JointTranslation;
}
if (_revolute2 != null)
{
coordinate2 = _revolute2.JointAngle;
}
else
{
coordinate2 = _prismatic2.JointTranslation;
}
float C = _constant - (coordinate1 + _ratio * coordinate2);
float impulse = _mass * (-C);
b1._sweep.C += b1._invMass * impulse * _J.Linear1;
b1._sweep.A += b1._invI * impulse * _J.Angular1;
b2._sweep.C += b2._invMass * impulse * _J.Linear2;
b2._sweep.A += b2._invI * impulse * _J.Angular2;
b1.SynchronizeTransform();
b2.SynchronizeTransform();
//TODO_ERIN not implemented
return linearError < Settings.LinearSlop;
}