C# Class Project290.Physics.Factories.JointFactory

An easy to use factory for using joints.
Exibir arquivo Open project: scastle/Solitude

Public Methods

Method Description
CreateAngleJoint ( World world, Body bodyA, Body bodyB ) : AngleJoint

Creates an angle joint.

CreateDistanceJoint ( World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB ) : DistanceJoint
CreateFixedAngleJoint ( World world, Body body ) : FixedAngleJoint

Creates a fixed angle joint.

CreateFixedDistanceJoint ( World world, Body body, Vector2 localAnchor, Vector2 worldAnchor ) : FixedDistanceJoint
CreateFixedFrictionJoint ( World world, Body body, Vector2 bodyAnchor ) : FixedFrictionJoint
CreateFixedRevoluteJoint ( World world, Body body, Vector2 bodyAnchor, Vector2 worldAnchor ) : FixedRevoluteJoint

Creates the fixed revolute joint.

CreateFrictionJoint ( World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB ) : FrictionJoint
CreateGearJoint ( World world, Joint jointA, Joint jointB, float ratio ) : GearJoint
CreateLineJoint ( Body bodyA, Body bodyB, Vector2 localanchorB, Vector2 axis ) : LineJoint

Creates a line joint

CreateLineJoint ( World world, Body bodyA, Body bodyB, Vector2 localanchorB, Vector2 axis ) : LineJoint

Creates a line joint and adds it to the world

CreatePrismaticJoint ( Body bodyA, Body bodyB, Vector2 localanchorB, Vector2 axis ) : PrismaticJoint

Creates a prsimatic joint

CreatePrismaticJoint ( World world, Body bodyA, Body bodyB, Vector2 localanchorB, Vector2 axis ) : PrismaticJoint

Creates a prismatic joint and adds it to the world

CreatePulleyJoint ( World world, Body bodyA, Body bodyB, Vector2 groundAnchorA, Vector2 groundAnchorB, Vector2 anchorA, Vector2 anchorB, float ratio ) : PulleyJoint
CreateRevoluteJoint ( Body bodyA, Body bodyB, Vector2 localanchorB ) : RevoluteJoint

Creates a revolute joint and adds it to the world

CreateRevoluteJoint ( World world, Body bodyA, Body bodyB, Vector2 localanchorB ) : RevoluteJoint

Creates a revolute joint and adds it to the world

CreateSliderJoint ( World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, float minLength, float maxLength ) : SliderJoint
CreateWeldJoint ( Body bodyA, Body bodyB, Vector2 localAnchor ) : WeldJoint

Creates a weld joint

CreateWeldJoint ( World world, Body bodyA, Body bodyB, Vector2 localanchorB ) : WeldJoint

Creates a weld joint and adds it to the world

CreateWeldJoint ( World world, Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB ) : WeldJoint

Method Details

CreateAngleJoint() public static method

Creates an angle joint.
public static CreateAngleJoint ( World world, Body bodyA, Body bodyB ) : AngleJoint
world Project290.Physics.Dynamics.World The world.
bodyA Project290.Physics.Dynamics.Body The first body.
bodyB Project290.Physics.Dynamics.Body The second body.
return Project290.Physics.Dynamics.Joints.AngleJoint

CreateDistanceJoint() public static method

public static CreateDistanceJoint ( World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB ) : DistanceJoint
world Project290.Physics.Dynamics.World
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
anchorA Microsoft.Xna.Framework.Vector2
anchorB Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.DistanceJoint

CreateFixedAngleJoint() public static method

Creates a fixed angle joint.
public static CreateFixedAngleJoint ( World world, Body body ) : FixedAngleJoint
world Project290.Physics.Dynamics.World The world.
body Project290.Physics.Dynamics.Body The body.
return Project290.Physics.Dynamics.Joints.FixedAngleJoint

CreateFixedDistanceJoint() public static method

public static CreateFixedDistanceJoint ( World world, Body body, Vector2 localAnchor, Vector2 worldAnchor ) : FixedDistanceJoint
world Project290.Physics.Dynamics.World
body Project290.Physics.Dynamics.Body
localAnchor Microsoft.Xna.Framework.Vector2
worldAnchor Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.FixedDistanceJoint

CreateFixedFrictionJoint() public static method

public static CreateFixedFrictionJoint ( World world, Body body, Vector2 bodyAnchor ) : FixedFrictionJoint
world Project290.Physics.Dynamics.World
body Project290.Physics.Dynamics.Body
bodyAnchor Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.FixedFrictionJoint

CreateFixedRevoluteJoint() public static method

Creates the fixed revolute joint.
public static CreateFixedRevoluteJoint ( World world, Body body, Vector2 bodyAnchor, Vector2 worldAnchor ) : FixedRevoluteJoint
world Project290.Physics.Dynamics.World The world.
body Project290.Physics.Dynamics.Body The body.
bodyAnchor Microsoft.Xna.Framework.Vector2 The body anchor.
worldAnchor Microsoft.Xna.Framework.Vector2 The world anchor.
return Project290.Physics.Dynamics.Joints.FixedRevoluteJoint

CreateFrictionJoint() public static method

public static CreateFrictionJoint ( World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB ) : FrictionJoint
world Project290.Physics.Dynamics.World
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
anchorA Microsoft.Xna.Framework.Vector2
anchorB Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.FrictionJoint

CreateGearJoint() public static method

public static CreateGearJoint ( World world, Joint jointA, Joint jointB, float ratio ) : GearJoint
world Project290.Physics.Dynamics.World
jointA Project290.Physics.Dynamics.Joints.Joint
jointB Project290.Physics.Dynamics.Joints.Joint
ratio float
return Project290.Physics.Dynamics.Joints.GearJoint

CreateLineJoint() public static method

Creates a line joint
public static CreateLineJoint ( Body bodyA, Body bodyB, Vector2 localanchorB, Vector2 axis ) : LineJoint
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
localanchorB Microsoft.Xna.Framework.Vector2
axis Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.LineJoint

CreateLineJoint() public static method

Creates a line joint and adds it to the world
public static CreateLineJoint ( World world, Body bodyA, Body bodyB, Vector2 localanchorB, Vector2 axis ) : LineJoint
world Project290.Physics.Dynamics.World
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
localanchorB Microsoft.Xna.Framework.Vector2
axis Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.LineJoint

CreatePrismaticJoint() public static method

Creates a prsimatic joint
public static CreatePrismaticJoint ( Body bodyA, Body bodyB, Vector2 localanchorB, Vector2 axis ) : PrismaticJoint
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
localanchorB Microsoft.Xna.Framework.Vector2
axis Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.PrismaticJoint

CreatePrismaticJoint() public static method

Creates a prismatic joint and adds it to the world
public static CreatePrismaticJoint ( World world, Body bodyA, Body bodyB, Vector2 localanchorB, Vector2 axis ) : PrismaticJoint
world Project290.Physics.Dynamics.World
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
localanchorB Microsoft.Xna.Framework.Vector2
axis Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.PrismaticJoint

CreatePulleyJoint() public static method

public static CreatePulleyJoint ( World world, Body bodyA, Body bodyB, Vector2 groundAnchorA, Vector2 groundAnchorB, Vector2 anchorA, Vector2 anchorB, float ratio ) : PulleyJoint
world Project290.Physics.Dynamics.World
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
groundAnchorA Microsoft.Xna.Framework.Vector2
groundAnchorB Microsoft.Xna.Framework.Vector2
anchorA Microsoft.Xna.Framework.Vector2
anchorB Microsoft.Xna.Framework.Vector2
ratio float
return Project290.Physics.Dynamics.Joints.PulleyJoint

CreateRevoluteJoint() public static method

Creates a revolute joint and adds it to the world
public static CreateRevoluteJoint ( Body bodyA, Body bodyB, Vector2 localanchorB ) : RevoluteJoint
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
localanchorB Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.RevoluteJoint

CreateRevoluteJoint() public static method

Creates a revolute joint and adds it to the world
public static CreateRevoluteJoint ( World world, Body bodyA, Body bodyB, Vector2 localanchorB ) : RevoluteJoint
world Project290.Physics.Dynamics.World
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
localanchorB Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.RevoluteJoint

CreateSliderJoint() public static method

public static CreateSliderJoint ( World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, float minLength, float maxLength ) : SliderJoint
world Project290.Physics.Dynamics.World
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
anchorA Microsoft.Xna.Framework.Vector2
anchorB Microsoft.Xna.Framework.Vector2
minLength float
maxLength float
return Project290.Physics.Dynamics.Joints.SliderJoint

CreateWeldJoint() public static method

Creates a weld joint
public static CreateWeldJoint ( Body bodyA, Body bodyB, Vector2 localAnchor ) : WeldJoint
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
localAnchor Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.WeldJoint

CreateWeldJoint() public static method

Creates a weld joint and adds it to the world
public static CreateWeldJoint ( World world, Body bodyA, Body bodyB, Vector2 localanchorB ) : WeldJoint
world Project290.Physics.Dynamics.World
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
localanchorB Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.WeldJoint

CreateWeldJoint() public static method

public static CreateWeldJoint ( World world, Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB ) : WeldJoint
world Project290.Physics.Dynamics.World
bodyA Project290.Physics.Dynamics.Body
bodyB Project290.Physics.Dynamics.Body
localAnchorA Microsoft.Xna.Framework.Vector2
localAnchorB Microsoft.Xna.Framework.Vector2
return Project290.Physics.Dynamics.Joints.WeldJoint