b2AreaJoint Class
Definition for a b2AreaJoint, which connects a group of bodies together so they maintain a constant area within them as the group distorts in reaction to collisions..
Constructor
b2AreaJoint
(
-
areaJointDef
Parameters:
-
areaJointDef
B2AreaJointDef
Item Index
Methods
- getDampingRatio
- getReactionForce
- getReactionTorque
- initVelocityConstraints
- setDampingRatio
- setFrequency
- setFrequency
- solvePositionConstraints
- solveVelocityConstraints
- create static
- destroy static
- getAnchorA
- getAnchorB
- getBodyA
- getBodyB
- getCollideConnected
- getNext
- getReactionForce
- getReactionTorque
- getType
- getUserData
- initVelocityConstraints
- isActive
- setUserData
- shiftOrigin
- solveVelocityConstraints
- solveVelocityConstraints
Methods
getDampingRatio
()
Float
public
Get damping ratio.
Returns:
Float:
getReactionForce
(
B2Vec2
public
-
invDeltaTime
-
out
Get the reaction force given the inverse time step. Unit is Newtons.
Parameters:
-
invDeltaTime
Number -
out
B2Vec2
Returns:
B2Vec2:
getReactionTorque
(
Float
public
-
invDeltaTime
Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a distance joint.
Parameters:
-
invDeltaTime
Float
Returns:
Float:
initVelocityConstraints
(
Void
public
-
data
Parameters:
-
data
B2SolverData
Returns:
Void:
setDampingRatio
(
Void
public
-
ratio
Set damping ratio.
Parameters:
-
ratio
Float
Returns:
Void:
setFrequency
(
Void
public
-
hz
Set frequency in Hz.
Parameters:
-
hz
Float
Returns:
Void:
setFrequency
()
Float
public
Get frequency in Hz.
Returns:
Float:
solvePositionConstraints
(
Void
public
-
data
Parameters:
-
data
B2SolverData
Returns:
Void:
solveVelocityConstraints
(
Void
public
-
data
Parameters:
-
data
B2SolverData
Returns:
Void:
Properties
m_bodies
Array.m_dampingRatio
Float
public
m_delta
B2Vec2
public
m_deltas
Array.m_frequencyHz
Float
public
m_impulse
Float
public
Default: 0.0
m_joints
Array.m_normals
Array.m_targetArea
Float
public
Default: 0.0