public static RevoluteJoint CreateRevoluteJoint(this World world, Body bodyA, Body bodyB, Vector2 anchor) { Vector2 localanchorA = bodyA.GetLocalPoint(bodyB.GetWorldPoint(anchor)); RevoluteJoint joint = new RevoluteJoint(bodyA, bodyB, localanchorA, anchor); world.AddJoint(joint); return joint; }
public static RopeJoint CreateRopeJoint(this World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false) { RopeJoint ropeJoint = new RopeJoint(bodyA, bodyB, anchorA, anchorB, useWorldCoordinates); world.AddJoint(ropeJoint); return ropeJoint; }
public static PrismaticJoint CreatePrismaticJoint(this World world, Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis, bool useWorldCoordinates = false) { PrismaticJoint joint = new PrismaticJoint(bodyA, bodyB, anchor, axis, useWorldCoordinates); world.AddJoint(joint); return joint; }
public static PulleyJoint CreatePulleyJoint(this World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, Vector2 worldAnchorA, Vector2 worldAnchorB, float ratio, bool useWorldCoordinates = false) { PulleyJoint pulleyJoint = new PulleyJoint(bodyA, bodyB, anchorA, anchorB, worldAnchorA, worldAnchorB, ratio, useWorldCoordinates); world.AddJoint(pulleyJoint); return pulleyJoint; }
public static GearJoint CreateGearJoint(this World world, Body bodyA, Body bodyB, Joint jointA, Joint jointB, float ratio) { GearJoint gearJoint = new GearJoint(bodyA, bodyB, jointA, jointB, ratio); world.AddJoint(gearJoint); return gearJoint; }
public static MotorJoint CreateMotorJoint(this World world, Body bodyA, Body bodyB, bool useWorldCoordinates = false) { MotorJoint joint = new MotorJoint(bodyA, bodyB, useWorldCoordinates); world.AddJoint(joint); return joint; }
public static FrictionJoint CreateFrictionJoint(this World world, Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates = false) { FrictionJoint frictionJoint = new FrictionJoint(bodyA, bodyB, anchor, useWorldCoordinates); world.AddJoint(frictionJoint); return frictionJoint; }
public static FixedMouseJoint CreateFixedMouseJoint(this World world, Body body, Vector2 worldAnchor) { FixedMouseJoint joint = new FixedMouseJoint(body, worldAnchor); world.AddJoint(joint); return joint; }
public static DistanceJoint CreateDistanceJoint(this World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false) { DistanceJoint distanceJoint = new DistanceJoint(bodyA, bodyB, anchorA, anchorB, useWorldCoordinates); world.AddJoint(distanceJoint); return distanceJoint; }
public static AngleJoint CreateAngleJoint(this World world, Body bodyA, Body bodyB) { AngleJoint angleJoint = new AngleJoint(bodyA, bodyB); world.AddJoint(angleJoint); return angleJoint; }
public static WeldJoint CreateWeldJoint(this World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false) { WeldJoint weldJoint = new WeldJoint(bodyA, bodyB, anchorA, anchorB, useWorldCoordinates); world.AddJoint(weldJoint); return weldJoint; }