|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.physics.box2d.Joint
com.badlogic.gdx.physics.box2d.joints.PrismaticJoint
public class PrismaticJoint
A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in body1. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
Field Summary |
---|
Fields inherited from class com.badlogic.gdx.physics.box2d.Joint |
---|
addr, jointEdgeA, jointEdgeB |
Constructor Summary | |
---|---|
PrismaticJoint(World world,
long addr)
|
Method Summary | |
---|---|
void |
enableLimit(boolean flag)
Enable/disable the joint limit. |
void |
enableMotor(boolean flag)
Enable/disable the joint motor. |
float |
getJointSpeed()
Get the current joint translation speed, usually in meters per second. |
float |
getJointTranslation()
Get the current joint translation, usually in meters. |
float |
getLowerLimit()
Get the lower joint limit, usually in meters. |
float |
getMotorForce(float invDt)
Get the current motor force given the inverse time step, usually in N. |
float |
getMotorSpeed()
Get the motor speed, usually in meters per second. |
float |
getUpperLimit()
Get the upper joint limit, usually in meters. |
boolean |
isLimitEnabled()
Is the joint limit enabled? |
boolean |
isMotorEnabled()
Is the joint motor enabled? |
void |
setLimits(float lower,
float upper)
Set the joint limits, usually in meters. |
void |
setMaxMotorForce(float force)
Set the maximum motor force, usually in N. |
void |
setMotorSpeed(float speed)
Set the motor speed, usually in meters per second. |
Methods inherited from class com.badlogic.gdx.physics.box2d.Joint |
---|
getAnchorA, getAnchorB, getBodyA, getBodyB, getReactionForce, getReactionTorque, getType, isActive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrismaticJoint(World world, long addr)
Method Detail |
---|
public float getJointTranslation()
public float getJointSpeed()
public boolean isLimitEnabled()
public void enableLimit(boolean flag)
public float getLowerLimit()
public float getUpperLimit()
public void setLimits(float lower, float upper)
public boolean isMotorEnabled()
public void enableMotor(boolean flag)
public void setMotorSpeed(float speed)
public float getMotorSpeed()
public void setMaxMotorForce(float force)
public float getMotorForce(float invDt)
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |