public class RevoluteJoint extends Joint
addr, jointEdgeA, jointEdgeB
Constructor and Description |
---|
RevoluteJoint(World world,
long addr) |
Modifier and Type | Method and Description |
---|---|
void |
enableLimit(boolean flag)
Enable/disable the joint limit.
|
void |
enableMotor(boolean flag)
Enable/disable the joint motor.
|
float |
getJointAngle()
Get the current joint angle in radians.
|
float |
getJointSpeed()
Get the current joint angle speed in radians per second.
|
Vector2 |
getLocalAnchorA() |
Vector2 |
getLocalAnchorB() |
float |
getLowerLimit()
Get the lower joint limit in radians.
|
float |
getMaxMotorTorque() |
float |
getMotorSpeed()
Get the motor speed in radians per second.
|
float |
getMotorTorque(float invDt)
Get the current motor torque, usually in N-m.
|
float |
getReferenceAngle()
Get the current motor torque, usually in N-m.
|
float |
getUpperLimit()
Get the upper joint limit in radians.
|
boolean |
isLimitEnabled()
Is the joint limit enabled?
|
boolean |
isMotorEnabled()
Is the joint motor enabled?
|
void |
setLimits(float lower,
float upper)
Set the joint limits in radians.
|
void |
setMaxMotorTorque(float torque)
Set the maximum motor torque, usually in N-m.
|
void |
setMotorSpeed(float speed)
Set the motor speed in radians per second.
|
getAnchorA, getAnchorB, getBodyA, getBodyB, getReactionForce, getReactionTorque, getType, getUserData, isActive, setUserData
public RevoluteJoint(World world, long addr)
public float getJointAngle()
public float getJointSpeed()
public boolean isLimitEnabled()
public void enableLimit(boolean flag)
public float getLowerLimit()
public float getUpperLimit()
public void setLimits(float lower, float upper)
upper
- public boolean isMotorEnabled()
public void enableMotor(boolean flag)
public void setMotorSpeed(float speed)
public float getMotorSpeed()
public void setMaxMotorTorque(float torque)
public float getMotorTorque(float invDt)
public Vector2 getLocalAnchorA()
public Vector2 getLocalAnchorB()
public float getReferenceAngle()
public float getMaxMotorTorque()