Table of Contents

Class JointFactory

Namespace
Alis.Core.Physic.Dynamics.Joints
Assembly
Alis.dll

An easy to use factory for using joints.

public static class JointFactory

Inheritance

Inherited Members

Methods

CreateAngleJoint(World, Body, Body)

Creates the angle joint using the specified world

public static AngleJoint CreateAngleJoint(World world, Body bodyA, Body bodyB)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

Returns

AngleJoint

The angle joint

CreateDistanceJoint(World, Body, Body, Vector2, Vector2, bool)

Creates the distance joint using the specified world

public static DistanceJoint CreateDistanceJoint(World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

anchorA Vector2

The anchor

anchorB Vector2

The anchor

useWorldCoordinates bool

The use world coordinates

Returns

DistanceJoint

The distance joint

CreateDistanceJoint(World, Body, Body)

Creates the distance joint using the specified world

public static DistanceJoint CreateDistanceJoint(World world, Body bodyA, Body bodyB)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

Returns

DistanceJoint

The distance joint

CreateFixedMouseJoint(World, Body, Vector2)

Creates the fixed mouse joint using the specified world

public static FixedMouseJoint CreateFixedMouseJoint(World world, Body body, Vector2 worldAnchor)

Parameters

world World

The world

body Body

The body

worldAnchor Vector2

The world anchor

Returns

FixedMouseJoint

The joint

CreateFrictionJoint(World, Body, Body, Vector2, bool)

Creates the friction joint using the specified world

public static FrictionJoint CreateFrictionJoint(World world, Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates = false)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

anchor Vector2

The anchor

useWorldCoordinates bool

The use world coordinates

Returns

FrictionJoint

The friction joint

CreateFrictionJoint(World, Body, Body)

Creates the friction joint using the specified world

public static FrictionJoint CreateFrictionJoint(World world, Body bodyA, Body bodyB)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

Returns

FrictionJoint

The friction joint

CreateGearJoint(World, Body, Body, Joint, Joint, float)

Creates the gear joint using the specified world

public static GearJoint CreateGearJoint(World world, Body bodyA, Body bodyB, Joint jointA, Joint jointB, float ratio)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

jointA Joint

The joint

jointB Joint

The joint

ratio float

The ratio

Returns

GearJoint

The gear joint

CreateMotorJoint(World, Body, Body, bool)

Creates the motor joint using the specified world

public static MotorJoint CreateMotorJoint(World world, Body bodyA, Body bodyB, bool useWorldCoordinates = false)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

useWorldCoordinates bool

The use world coordinates

Returns

MotorJoint

The joint

CreatePrismaticJoint(World, Body, Body, Vector2, Vector2, bool)

Creates the prismatic joint using the specified world

public static PrismaticJoint CreatePrismaticJoint(World world, Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis, bool useWorldCoordinates = false)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

anchor Vector2

The anchor

axis Vector2

The axis

useWorldCoordinates bool

The use world coordinates

Returns

PrismaticJoint

The joint

CreatePulleyJoint(World, Body, Body, Vector2, Vector2, Vector2, Vector2, float, bool)

Creates the pulley joint using the specified world

public static PulleyJoint CreatePulleyJoint(World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, Vector2 worldAnchorA, Vector2 worldAnchorB, float ratio, bool useWorldCoordinates = false)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

anchorA Vector2

The anchor

anchorB Vector2

The anchor

worldAnchorA Vector2

The world anchor

worldAnchorB Vector2

The world anchor

ratio float

The ratio

useWorldCoordinates bool

The use world coordinates

Returns

PulleyJoint

The pulley joint

CreateRevoluteJoint(World, Body, Body, Vector2, Vector2, bool)

Creates the revolute joint using the specified world

public static RevoluteJoint CreateRevoluteJoint(World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

anchorA Vector2

The anchor

anchorB Vector2

The anchor

useWorldCoordinates bool

The use world coordinates

Returns

RevoluteJoint

The joint

CreateRevoluteJoint(World, Body, Body, Vector2)

Creates the revolute joint using the specified world

public static RevoluteJoint CreateRevoluteJoint(World world, Body bodyA, Body bodyB, Vector2 anchor)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

anchor Vector2

The anchor

Returns

RevoluteJoint

The joint

CreateRopeJoint(World, Body, Body, Vector2, Vector2, bool)

Creates the rope joint using the specified world

public static RopeJoint CreateRopeJoint(World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

anchorA Vector2

The anchor

anchorB Vector2

The anchor

useWorldCoordinates bool

The use world coordinates

Returns

RopeJoint

The rope joint

CreateWeldJoint(World, Body, Body, Vector2, Vector2, bool)

Creates the weld joint using the specified world

public static WeldJoint CreateWeldJoint(World world, Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

anchorA Vector2

The anchor

anchorB Vector2

The anchor

useWorldCoordinates bool

The use world coordinates

Returns

WeldJoint

The weld joint

CreateWheelJoint(World, Body, Body, Vector2, Vector2, bool)

Creates the wheel joint using the specified world

public static WheelJoint CreateWheelJoint(World world, Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis, bool useWorldCoordinates = false)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

anchor Vector2

The anchor

axis Vector2

The axis

useWorldCoordinates bool

The use world coordinates

Returns

WheelJoint

The joint

CreateWheelJoint(World, Body, Body, Vector2)

Creates the wheel joint using the specified world

public static WheelJoint CreateWheelJoint(World world, Body bodyA, Body bodyB, Vector2 axis)

Parameters

world World

The world

bodyA Body

The body

bodyB Body

The body

axis Vector2

The axis

Returns

WheelJoint

The wheel joint