public class MotorJoint extends Joint
m_bodyA, m_bodyB, m_edgeA, m_edgeB, m_islandFlag, m_next, m_prev, m_userData, pool| Constructor and Description |
|---|
MotorJoint(IWorldPool pool,
MotorJointDef def) |
| Modifier and Type | Method and Description |
|---|---|
void |
getAnchorA(Vec2 out)
get the anchor point on bodyA in world coordinates.
|
void |
getAnchorB(Vec2 out)
get the anchor point on bodyB in world coordinates.
|
float |
getAngularOffset() |
float |
getCorrectionFactor() |
Vec2 |
getLinearOffset()
Get the target linear offset, in frame A, in meters.
|
void |
getLinearOffset(Vec2 out)
Get the target linear offset, in frame A, in meters.
|
float |
getMaxForce()
Get the maximum friction force in N.
|
float |
getMaxTorque()
Get the maximum friction torque in N*m.
|
void |
getReactionForce(float inv_dt,
Vec2 out)
get the reaction force on body2 at the joint anchor in Newtons.
|
float |
getReactionTorque(float inv_dt)
get the reaction torque on body2 in N*m.
|
void |
initVelocityConstraints(SolverData data)
Internal
|
void |
setAngularOffset(float angularOffset)
Set the target angular offset, in radians.
|
void |
setCorrectionFactor(float correctionFactor) |
void |
setLinearOffset(Vec2 linearOffset)
Set the target linear offset, in frame A, in meters.
|
void |
setMaxForce(float force)
Set the maximum friction force in N.
|
void |
setMaxTorque(float torque)
Set the maximum friction torque in N*m.
|
boolean |
solvePositionConstraints(SolverData data)
This returns true if the position errors are within tolerance.
|
void |
solveVelocityConstraints(SolverData data)
Internal
|
create, destroy, destructor, getBodyA, getBodyB, getCollideConnected, getNext, getType, getUserData, isActive, setUserDatapublic MotorJoint(IWorldPool pool, MotorJointDef def)
public void getAnchorA(Vec2 out)
JointgetAnchorA in class Jointpublic void getAnchorB(Vec2 out)
JointgetAnchorB in class Jointpublic void getReactionForce(float inv_dt,
Vec2 out)
JointgetReactionForce in class Jointpublic float getReactionTorque(float inv_dt)
JointgetReactionTorque in class Jointpublic float getCorrectionFactor()
public void setCorrectionFactor(float correctionFactor)
public void setLinearOffset(Vec2 linearOffset)
public void getLinearOffset(Vec2 out)
public Vec2 getLinearOffset()
public void setAngularOffset(float angularOffset)
angularOffset - public float getAngularOffset()
public void setMaxForce(float force)
force - public float getMaxForce()
public void setMaxTorque(float torque)
public float getMaxTorque()
public void initVelocityConstraints(SolverData data)
JointinitVelocityConstraints in class Jointpublic void solveVelocityConstraints(SolverData data)
JointsolveVelocityConstraints in class Jointpublic boolean solvePositionConstraints(SolverData data)
JointsolvePositionConstraints in class JointCopyright © 2017. All rights reserved.