public class WeldJoint
A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the
island constraint solver is approximate.
Constructors
protected WeldJoint(IWorldPool argWorld, WeldJointDef def) |
Methods
public float getReferenceAngle() | |
public Vec2 getLocalAnchorA() | |
public Vec2 getLocalAnchorB() | |
public float getFrequency() | |
public void setFrequency(float frequencyHz) | |
public float getDampingRatio() | |
public void setDampingRatio(float dampingRatio) | |
public void getAnchorA(Vec2 argOut) | get the anchor point on bodyA in world coordinates. |
public void getAnchorB(Vec2 argOut) | get the anchor point on bodyB in world coordinates. |
public void getReactionForce(float inv_dt, Vec2 argOut) | get the reaction force on body2 at the joint anchor in Newtons. |
public float getReactionTorque(float inv_dt) | get the reaction torque on body2 in N*m. |
public void initVelocityConstraints(SolverData data) | |
public void solveVelocityConstraints(SolverData data) | |
public boolean solvePositionConstraints(SolverData data) | This returns true if the position errors are within tolerance. |
Inherited fields
From Joint
m_prev, m_next, m_edgeA, m_edgeB, m_bodyA, m_bodyB, m_islandFlag, m_userData, pool
Inherited methods
Constructor details
WeldJoint
protected WeldJoint(IWorldPool argWorld, WeldJointDef def)Method details
getReferenceAngle
public float getReferenceAngle()getLocalAnchorA
public Vec2 getLocalAnchorA()getLocalAnchorB
public Vec2 getLocalAnchorB()getFrequency
public float getFrequency()setFrequency
public void setFrequency(float frequencyHz)getDampingRatio
public float getDampingRatio()setDampingRatio
public void setDampingRatio(float dampingRatio)getAnchorA
public void getAnchorA(Vec2 argOut)get the anchor point on bodyA in world coordinates.
getAnchorB
public void getAnchorB(Vec2 argOut)get the anchor point on bodyB in world coordinates.
getReactionForce
public void getReactionForce(float inv_dt, Vec2 argOut)get the reaction force on body2 at the joint anchor in Newtons.
getReactionTorque
public float getReactionTorque(float inv_dt)get the reaction torque on body2 in N*m.
initVelocityConstraints
public void initVelocityConstraints(SolverData data)solveVelocityConstraints
public void solveVelocityConstraints(SolverData data)solvePositionConstraints
public boolean solvePositionConstraints(SolverData data)This returns true if the position errors are within tolerance.