|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jbox2d.dynamics.joints.Joint
org.jbox2d.dynamics.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 | |
---|---|
float |
m_angularMass
|
boolean |
m_enableLimit
|
boolean |
m_enableMotor
|
float |
m_force
|
float |
m_limitForce
|
float |
m_limitPositionImpulse
|
LimitState |
m_limitState
|
Jacobian |
m_linearJacobian
|
float |
m_linearMass
|
Vec2 |
m_localAnchor1
|
Vec2 |
m_localAnchor2
|
Vec2 |
m_localXAxis1
|
Vec2 |
m_localYAxis1
|
float |
m_lowerTranslation
|
float |
m_maxMotorForce
|
float |
m_motorForce
|
Jacobian |
m_motorJacobian
|
float |
m_motorMass
|
float |
m_motorSpeed
|
float |
m_refAngle
|
float |
m_torque
|
float |
m_upperTranslation
|
Fields inherited from class org.jbox2d.dynamics.joints.Joint |
---|
m_body1, m_body2, m_collideConnected, m_islandFlag, m_next, m_node1, m_node2, m_prev, m_type, m_userData |
Constructor Summary | |
---|---|
PrismaticJoint(PrismaticJointDef def)
|
Method Summary | |
---|---|
void |
enableLimit(boolean flag)
Enable/disable the joint limit. |
void |
enableMotor(boolean flag)
Enable/disable the joint motor. |
Vec2 |
getAnchor1()
Get the anchor point on body1 in world coordinates. |
Vec2 |
getAnchor2()
Get the anchor point on body2 in world coordinates. |
float |
getJointSpeed()
|
float |
getJointTranslation()
|
float |
getLowerLimit()
Get the lower joint limit, usually in meters. |
float |
getMotorForce()
Get the current motor torque, usually in N. |
float |
getMotorSpeed()
Get the motor speed, usually in meters per second. |
Vec2 |
getReactionForce()
Get the reaction force on body2 at the joint anchor. |
float |
getReactionTorque()
Get the reaction torque on body2. |
float |
getUpperLimit()
Get the upper joint limit, usually in meters. |
void |
initVelocityConstraints(TimeStep step)
|
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 torque, usually in N. |
void |
setMotorSpeed(float speed)
Set the motor speed, usually in meters per second. |
boolean |
solvePositionConstraints()
This returns true if the position errors are within tolerance. |
void |
solveVelocityConstraints(TimeStep step)
|
Methods inherited from class org.jbox2d.dynamics.joints.Joint |
---|
create, destroy, destructor, getBody1, getBody2, getNext, getType, getUserData, initPositionConstraints |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Vec2 m_localAnchor1
public Vec2 m_localAnchor2
public Vec2 m_localXAxis1
public Vec2 m_localYAxis1
public float m_refAngle
public Jacobian m_linearJacobian
public float m_linearMass
public float m_force
public float m_angularMass
public float m_torque
public Jacobian m_motorJacobian
public float m_motorMass
public float m_motorForce
public float m_limitForce
public float m_limitPositionImpulse
public float m_lowerTranslation
public float m_upperTranslation
public float m_maxMotorForce
public float m_motorSpeed
public boolean m_enableLimit
public boolean m_enableMotor
public LimitState m_limitState
Constructor Detail |
---|
public PrismaticJoint(PrismaticJointDef def)
Method Detail |
---|
public void initVelocityConstraints(TimeStep step)
initVelocityConstraints
in class Joint
public void solveVelocityConstraints(TimeStep step)
solveVelocityConstraints
in class Joint
public boolean solvePositionConstraints()
Joint
solvePositionConstraints
in class Joint
public Vec2 getAnchor1()
Joint
getAnchor1
in class Joint
public Vec2 getAnchor2()
Joint
getAnchor2
in class Joint
public float getJointTranslation()
public float getJointSpeed()
public float getReactionTorque()
Joint
getReactionTorque
in class Joint
public Vec2 getReactionForce()
Joint
getReactionForce
in class Joint
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |