C# Class Box2D.Dynamics.Joints.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: gerich-home/box2dnet Class Usage Examples

Public Properties

Property Type Description
EnableLimit bool
EnableMotor bool
LocalAnchorA Box2D.Common.Vec2
LocalAnchorB Box2D.Common.Vec2
LocalAxisA Box2D.Common.Vec2
LowerTranslation float
MaxMotorForce float
MotorSpeed float
ReferenceAngle float
UpperTranslation float

Public Methods

Method Description
Initialize ( Body b1, Body b2, Vec2 anchor, Vec2 axis ) : void

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

PrismaticJointDef ( ) : Box2D.Common

Method Details

Initialize() public method

Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
public Initialize ( Body b1, Body b2, Vec2 anchor, Vec2 axis ) : void
b1 Body
b2 Body
anchor Box2D.Common.Vec2
axis Box2D.Common.Vec2
return void

PrismaticJointDef() public method

public PrismaticJointDef ( ) : Box2D.Common
return Box2D.Common

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

LocalAnchorA public property

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

LocalAnchorB public property

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

LocalAxisA public property

The local translation axis in body1.
public Vec2,Box2D.Common LocalAxisA
return Box2D.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