public PulleyJoint(PulleyJointDef def)
: base(def)
{
_ground = _body1.GetWorld().GetGroundBody();
_groundAnchor1 = def.GroundAnchor1 - _ground.GetTransform().position;
_groundAnchor2 = def.GroundAnchor2 - _ground.GetTransform().position;
_localAnchor1 = def.LocalAnchor1;
_localAnchor2 = def.LocalAnchor2;
Box2DXDebug.Assert(def.Ratio != 0.0f);
_ratio = def.Ratio;
_constant = def.Length1 + _ratio * def.Length2;
_maxLength1 = Common.Math.Min(def.MaxLength1, _constant - _ratio * PulleyJoint.MinPulleyLength);
_maxLength2 = Common.Math.Min(def.MaxLength2, (_constant - PulleyJoint.MinPulleyLength) / _ratio);
_impulse = 0.0f;
_limitImpulse1 = 0.0f;
_limitImpulse2 = 0.0f;
}