API Documentation for:
Show:

b2WeldJoint Class

Extends b2Joint
Defined in: b2WeldJoint:17
Module: Joints

A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate.

Constructor

b2WeldJoint

(
  • weldJointDef
)

Defined in b2WeldJoint:17

Parameters:

  • weldJointDef B2WeldJointDef

Methods

getAnchorB

(
  • [out=b2Vec2]
)
B2Vec2 | Object public

Defined in getAnchorB:278

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getAnchorB

(
  • [out=b2Vec2]
)
B2Vec2 | Object public

Defined in getAnchorB:289

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getDampingRatio

() Float public

Defined in getDampingRatio:400

Get damping ratio.

Returns:

Float:

getLocalAnchorA

(
  • [out=b2Vec2]
)
B2Vec2 | Object public

Defined in getLocalAnchorA:328

The local anchor point relative to bodyA's origin.

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getLocalAnchorB

(
  • [out=b2Vec2]
)
B2Vec2 | Object public

Defined in getLocalAnchorB:341

The local anchor point relative to bodyA's origin.

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getReactionForce

(
  • invDeltaTime
  • [out=b2Vec2]
)
B2Vec2 | Object public

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

Parameters:

  • invDeltaTime Float
  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

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:

getReferenceAngle

() Float public

Get frequency in Hz.

Returns:

Float:

getReferenceAngle

() Float public

Get the reference angle.

Returns:

Float:

initVelocityConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

setDampingRatio

(
  • ratio
)
Void public

Defined in setDampingRatio:388

Set damping ratio.

Parameters:

  • ratio Float

Returns:

Void:

setFrequency

(
  • hz
)
Void public

Defined in setFrequency:365

Set frequency in Hz.

Parameters:

  • hz Float

Returns:

Void:

solvePositionConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

solveVelocityConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

Properties

m_bias

Float public

Defined in m_bias:171

Default: 0.0

m_dampingRatio

Float public

Defined in m_dampingRatio:157

m_frequencyHz

Float public

Defined in m_frequencyHz:150

m_gamma

Float public

Defined in m_gamma:179

Default: 0.0

m_impulse

B2Vec3 public

Defined in m_impulse:65

m_indexA

Int public

Defined in m_indexA:189

Default: 0

m_indexB

Int public

Defined in m_indexB:197

Default: 0

m_invMassA

Float public

Defined in m_invMassA:205

Default: 0.0

m_invMassA

Float public

Defined in m_invMassA:221

Default: 0.0

m_invMassB

Float public

Defined in m_invMassB:213

Default: 0.0

m_invMassB

Float public

Defined in m_invMassB:229

Default: 0.0

m_K

B2Mat33 public

Defined in m_K:137

m_lalcA

B2Vec2 public

Defined in m_lalcA:123

m_lalcB

B2Vec2 public

Defined in m_lalcB:130

m_localAnchorA

B2Vec2 public

Defined in m_localAnchorA:51

m_localAnchorB

B2Vec2 public

Defined in m_localAnchorB:58

m_localCenterA

B2Vec2 public

Defined in m_localCenterA:95

m_localCenterB

B2Vec2 public

Defined in m_localCenterB:102

m_mass

B2Mat33 public

Defined in m_mass:73

m_qA

B2Rot public

Defined in m_qA:109

m_qB

B2Rot public

Defined in m_qB:116

m_rA

B2Vec2 public

Defined in m_rA:81

m_rB

B2Vec2 public

Defined in m_rB:88

m_referenceAngle

Float public