|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.physics.box2d.JointDef com.badlogic.gdx.physics.box2d.joints.PrismaticJointDef
public class 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.badlogic.gdx.physics.box2d.JointDef |
---|
JointDef.JointType |
Field Summary | |
---|---|
boolean |
enableLimit
Enable/disable the joint limit. |
boolean |
enableMotor
Enable/disable the joint motor. |
Vector2 |
localAnchorA
The local anchor point relative to body1's origin. |
Vector2 |
localAnchorB
The local anchor point relative to body2's origin. |
Vector2 |
localAxisA
The local translation axis in body1. |
float |
lowerTranslation
The lower translation limit, usually in meters. |
float |
maxMotorForce
The maximum motor torque, usually in N-m. |
float |
motorSpeed
The desired motor speed in radians per second. |
float |
referenceAngle
The constrained angle between the bodies: body2_angle - body1_angle. |
float |
upperTranslation
The upper translation limit, usually in meters. |
Fields inherited from class com.badlogic.gdx.physics.box2d.JointDef |
---|
bodyA, bodyB, collideConnected, type |
Constructor Summary | |
---|---|
PrismaticJointDef()
|
Method Summary | |
---|---|
void |
initialize(Body bodyA,
Body bodyB,
Vector2 anchor,
Vector2 axis)
Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Vector2 localAnchorA
public final Vector2 localAnchorB
public final Vector2 localAxisA
public float referenceAngle
public boolean enableLimit
public float lowerTranslation
public float upperTranslation
public boolean enableMotor
public float maxMotorForce
public float motorSpeed
Constructor Detail |
---|
public PrismaticJointDef()
Method Detail |
---|
public void initialize(Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |