Beispiel #1
0
        protected override void CopyTo(JointInfo target)
        {
            base.CopyTo(target);
            AngleJointInfo c = target as AngleJointInfo;

            c.angle      = this.angle;
            c.biasFactor = this.biasFactor;
            c.softness   = this.softness;
            c.maxImpulse = this.maxImpulse;
        }
 private void DrawJoint(Canvas canvas, AngleJointInfo joint)
 {
     this.DrawLocalAngleConstraint(canvas,
         joint.BodyA,
         Vector2.Zero,
         joint.BodyB.GameObj.Transform.Angle - joint.TargetAngle,
         joint.BodyA.GameObj.Transform.Angle,
         joint.BodyA.BoundRadius);
     this.DrawLocalAngleConstraint(canvas,
         joint.BodyB,
         Vector2.Zero,
         joint.BodyA.GameObj.Transform.Angle + joint.TargetAngle,
         joint.BodyB.GameObj.Transform.Angle,
         joint.BodyB.BoundRadius);
     this.DrawLocalLooseConstraint(canvas, joint.BodyA, joint.BodyB, Vector2.Zero, Vector2.Zero);
 }