API Documentation for:
Show:

b2AreaJoint Class

Extends b2Joint
Defined in: b2AreaJoint:17
Module: Joints

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
)

Defined in b2AreaJoint:17

Parameters:

  • areaJointDef B2AreaJointDef

Methods

getDampingRatio

() Float public

Defined in getDampingRatio:256

Get damping ratio.

Returns:

Float:

getReactionForce

(
  • invDeltaTime
  • out
)
B2Vec2 public

Get the reaction force given the inverse time step. Unit is Newtons.

Parameters:

  • invDeltaTime Number
  • out B2Vec2

Returns:

B2Vec2:

getReactionTorque

(
  • invDeltaTime
)
Float public

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

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

setDampingRatio

(
  • ratio
)
Void public

Defined in setDampingRatio:240

Set damping ratio.

Parameters:

  • ratio Float

Returns:

Void:

setFrequency

(
  • hz
)
Void public

Defined in setFrequency:214

Set frequency in Hz.

Parameters:

  • hz Float

Returns:

Void:

setFrequency

() Float public

Defined in setFrequency:229

Get frequency in Hz.

Returns:

Float:

solvePositionConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

solveVelocityConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

Properties

m_bodies

Array. public

Defined in m_bodies:95

m_dampingRatio

Float public

Defined in m_dampingRatio:103

m_delta

B2Vec2 public

Defined in m_delta:56

m_deltas

Array. public

Defined in m_deltas:63

m_frequencyHz

Float public

Defined in m_frequencyHz:110

m_impulse

Float public

Defined in m_impulse:117

Default: 0.0

m_joints

Array. public

Defined in m_joints:70

m_normals

Array. public

Defined in m_normals:77

m_targetArea

Float public

Defined in m_targetArea:125

Default: 0.0

m_targetLengths

Array public

Defined in m_targetLengths:85