C# Class Box2DX.Dynamics.PrismaticJointDef

Prismatic joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
Inheritance: JointDef
Show file Open project: danielpcox/Crisis-at-Swiss-Station Class Usage Examples

Public Properties

Property Type Description
EnableLimit bool
EnableMotor bool
LocalAnchor1 Box2DX.Common.Vec2
LocalAnchor2 Box2DX.Common.Vec2
LocalAxis1 Box2DX.Common.Vec2
LowerTranslation float
MaxMotorForce float
MotorSpeed float
ReferenceAngle float
UpperTranslation float

Public Methods

Method Description
Initialize ( Body body1, Body body2, Vec2 anchor, Vec2 axis ) : void

Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.

PrismaticJointDef ( ) : System

Method Details

Initialize() public method

Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
public Initialize ( Body body1, Body body2, Vec2 anchor, Vec2 axis ) : void
body1 Body
body2 Body
anchor Box2DX.Common.Vec2
axis Box2DX.Common.Vec2
return void

PrismaticJointDef() public method

public PrismaticJointDef ( ) : System
return System

Property Details

EnableLimit public property

Enable/disable the joint limit.
public bool EnableLimit
return bool

EnableMotor public property

Enable/disable the joint motor.
public bool EnableMotor
return bool

LocalAnchor1 public property

The local anchor point relative to body1's origin.
public Vec2,Box2DX.Common LocalAnchor1
return Box2DX.Common.Vec2

LocalAnchor2 public property

The local anchor point relative to body2's origin.
public Vec2,Box2DX.Common LocalAnchor2
return Box2DX.Common.Vec2

LocalAxis1 public property

The local translation axis in body1.
public Vec2,Box2DX.Common LocalAxis1
return Box2DX.Common.Vec2

LowerTranslation public property

The lower translation limit, usually in meters.
public float LowerTranslation
return float

MaxMotorForce public property

The maximum motor torque, usually in N-m.
public float MaxMotorForce
return float

MotorSpeed public property

The desired motor speed in radians per second.
public float MotorSpeed
return float

ReferenceAngle public property

The constrained angle between the bodies: body2_angle - body1_angle.
public float ReferenceAngle
return float

UpperTranslation public property

The upper translation limit, usually in meters.
public float UpperTranslation
return float