Example #1
0
        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;
        }
Example #2
0
 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);
 }
Example #3
0
 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);
 }
Example #4
0
 public PrismaticJoint(World world, RigidBody body1, RigidBody body2)
     : base(world)
 {
     fixedAngle = new FixedAngle(body1, body2);
     pointOnLine = new PointOnLine(body1, body2, body1.position, body2.position);
 }