internal MouseJoint(MouseJointDef def) : base(def) { Target = def.Target; _localAnchorB = MathUtils.MulT(BodyB.GetTransform(), Target); MaxForce = def.MaxForce; Stiffness = def.Stiffness; Damping = def.Damping; _impulse.SetZero(); _beta = 0.0f; _gamma = 0.0f; }
internal MouseJoint(MouseJointDef def) : base(def) { Debug.Assert(def.Target.IsValid()); Debug.Assert(def.MaxForce.IsValid() && def.MaxForce >= 0.0f); Debug.Assert(def.FrequencyHz.IsValid() && def.FrequencyHz >= 0.0f); Debug.Assert(def.DampingRatio.IsValid() && def.DampingRatio >= 0.0f); _targetA = def.Target; _localAnchorB = MathUtils.MulT(BodyB.GetTransform(), _targetA); _maxForce = def.MaxForce; _impulse.SetZero(); _frequencyHz = def.FrequencyHz; _dampingRatio = def.DampingRatio; _beta = 0.0f; _gamma = 0.0f; }