예제 #1
0
 public PrismaticJoint(World world, RigidBody body1, RigidBody body2, FP minimumDistance, FP maximumDistance) : base(world)
 {
     this.fixedAngle           = new FixedAngle(body1, body2);
     this.pointOnLine          = new PointOnLine(body1, body2, body1.position, body2.position);
     this.minDistance          = new PointPointDistance(body1, body2, body1.position, body2.position);
     this.minDistance.Behavior = PointPointDistance.DistanceBehavior.LimitMinimumDistance;
     this.minDistance.Distance = minimumDistance;
     this.maxDistance          = new PointPointDistance(body1, body2, body1.position, body2.position);
     this.maxDistance.Behavior = PointPointDistance.DistanceBehavior.LimitMaximumDistance;
     this.maxDistance.Distance = maximumDistance;
 }
예제 #2
0
 public PrismaticJoint(World world, RigidBody body1, RigidBody body2, TSVector pointOnBody1, TSVector pointOnBody2, FP maximumDistance, FP minimumDistance) : base(world)
 {
     this.fixedAngle  = new FixedAngle(body1, body2);
     this.pointOnLine = new PointOnLine(body1, body2, pointOnBody1, pointOnBody2);
 }
예제 #3
0
 public PrismaticJoint(World world, RigidBody body1, RigidBody body2) : base(world)
 {
     this.fixedAngle  = new FixedAngle(body1, body2);
     this.pointOnLine = new PointOnLine(body1, body2, body1.position, body2.position);
 }