public abstract class Joint
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Body |
m_bodyA |
protected Body |
m_bodyB |
JointEdge |
m_edgeA |
JointEdge |
m_edgeB |
boolean |
m_islandFlag |
Joint |
m_next |
Joint |
m_prev |
java.lang.Object |
m_userData |
protected IWorldPool |
pool |
Modifier | Constructor and Description |
---|---|
protected |
Joint(IWorldPool worldPool,
JointDef def) |
Modifier and Type | Method and Description |
---|---|
static Joint |
create(World world,
JointDef def) |
static void |
destroy(Joint joint) |
void |
destructor()
Override to handle destruction of joint
|
abstract void |
getAnchorA(Vec2 out)
get the anchor point on bodyA in world coordinates.
|
abstract void |
getAnchorB(Vec2 out)
get the anchor point on bodyB in world coordinates.
|
Body |
getBodyA()
get the first body attached to this joint.
|
Body |
getBodyB()
get the second body attached to this joint.
|
boolean |
getCollideConnected() |
Joint |
getNext()
get the next joint the world joint list.
|
abstract void |
getReactionForce(float inv_dt,
Vec2 out)
get the reaction force on body2 at the joint anchor in Newtons.
|
abstract float |
getReactionTorque(float inv_dt)
get the reaction torque on body2 in N*m.
|
JointType |
getType()
get the type of the concrete joint.
|
java.lang.Object |
getUserData()
get the user data pointer.
|
abstract void |
initVelocityConstraints(SolverData data) |
boolean |
isActive()
Short-cut function to determine if either body is inactive.
|
void |
setUserData(java.lang.Object data)
Set the user data pointer.
|
abstract boolean |
solvePositionConstraints(SolverData data)
This returns true if the position errors are within tolerance.
|
abstract void |
solveVelocityConstraints(SolverData data) |
public Joint m_prev
public Joint m_next
public JointEdge m_edgeA
public JointEdge m_edgeB
protected Body m_bodyA
protected Body m_bodyB
public boolean m_islandFlag
public java.lang.Object m_userData
protected IWorldPool pool
protected Joint(IWorldPool worldPool, JointDef def)
public static void destroy(Joint joint)
public JointType getType()
public final Body getBodyA()
public final Body getBodyB()
public abstract void getAnchorA(Vec2 out)
public abstract void getAnchorB(Vec2 out)
public abstract void getReactionForce(float inv_dt, Vec2 out)
inv_dt
- public abstract float getReactionTorque(float inv_dt)
inv_dt
- public Joint getNext()
public java.lang.Object getUserData()
public void setUserData(java.lang.Object data)
public final boolean getCollideConnected()
public boolean isActive()
public abstract void initVelocityConstraints(SolverData data)
public abstract void solveVelocityConstraints(SolverData data)
public abstract boolean solvePositionConstraints(SolverData data)
baumgarte
- public void destructor()
Copyright © 2017. All Rights Reserved.