Exemple #1
0
		private void CreateFixedAngleJoint()
		{
			if (RigidBodyB != null)
				Constraint = new FixedAngle(RigidBodyA, RigidBodyB);
			else
				Constraint = new global::Jitter.Dynamics.Constraints.SingleBody.FixedAngle(RigidBodyA);
		}
        public PrismaticJoint(World world, RigidBody body1, RigidBody body2,float minimumDistance, float maximumDistance)
            : base(world)
        {
            fixedAngle = new FixedAngle(body1, body2);
            pointOnLine = new PointOnLine(body1, body2, body1.position, body2.position);

            minDistance = new PointPointDistance(body1, body2, body1.position, body2.position);
            minDistance.Behavior = PointPointDistance.DistanceBehavior.LimitMinimumDistance;
            minDistance.Distance = minimumDistance;

            maxDistance = new PointPointDistance(body1, body2, body1.position, body2.position);
            maxDistance.Behavior = PointPointDistance.DistanceBehavior.LimitMaximumDistance;
            maxDistance.Distance = maximumDistance;
        }
 public PrismaticJoint(World world, RigidBody body1, RigidBody body2, JVector pointOnBody1, JVector pointOnBody2, float maximumDistance, float minimumDistance)
     : base(world)
 {
     fixedAngle = new FixedAngle(body1, body2);
     pointOnLine = new PointOnLine(body1, body2, pointOnBody1, pointOnBody2);
 }
 public PrismaticJoint(World world, RigidBody body1, RigidBody body2, JVector pointOnBody1,JVector pointOnBody2)
     : base(world)
 {
     fixedAngle = new FixedAngle(body1, body2);
     pointOnLine = new PointOnLine(body1, body2, pointOnBody1, pointOnBody2);
 }
 public PrismaticJoint(World world, RigidBody body1, RigidBody body2)
     : base(world)
 {
     fixedAngle = new FixedAngle(body1, body2);
     pointOnLine = new PointOnLine(body1, body2, body1.position, body2.position);
 }