API Documentation for:
Show:

b2FrictionJoint Class

Extends b2Joint
Defined in: b2FrictionJoint:17
Module: Joints

Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.

Constructor

b2FrictionJoint

(
  • frictionJointDef
)

Defined in b2FrictionJoint:17

Parameters:

  • frictionJointDef B2FrictionJointDef

Methods

getAnchorA

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

Defined in getAnchorA:281

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getAnchorB

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

Defined in getAnchorB:292

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getLocalAnchorA

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

Defined in getLocalAnchorA:331

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:344

The local anchor point relative to bodyB's origin.

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getMaxForce

() Float public

Defined in getMaxForce:369

Get the maximum friction force in N.

Returns:

Float:

getMaxTorque

() Float public

Defined in getMaxTorque:392

Get the maximum friction torque in N*m.

Returns:

Float:

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:

initVelocityConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

setMaxForce

(
  • force
)
Void public

Defined in setMaxForce:357

Set the maximum friction force in N.

Parameters:

  • force Float

Returns:

Void:

setMaxTorque

(
  • torque
)
Void public

Defined in setMaxTorque:380

Set the maximum friction torque in N*m.

Parameters:

  • torque Float

Returns:

Void:

solvePositionConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

solveVelocityConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

Properties

m_angularImpulse

Float public

Default: 0.0

m_angularMass

Number public

Defined in m_angularMass:164

Default: 0

m_indexA

Int public

Defined in m_indexA:183

Default: 0

m_indexB

Int public

Defined in m_indexB:191

Default: 0

m_invIA

Float public

Defined in m_invIA:215

Default: 0.0

m_invIB

Float public

Defined in m_invIB:223

Default: 0.0

m_invMassA

Float public

Defined in m_invMassA:199

Default: 0.0

m_invMassB

Float public

Defined in m_invMassB:207

Default: 0.0

m_K

B2Mat22 public

Defined in m_K:136

m_lalcA

B2Vec2 public

Defined in m_lalcA:122

m_lalcB

B2Vec2 public

Defined in m_lalcB:129

m_linearImpulse

B2Vec2 public

Defined in m_linearImpulse:65

m_linearMass

B2Mat22 public

Defined in m_linearMass:72

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:94

m_localCenterB

B2Vec2 public

Defined in m_localCenterB:101

m_maxForce

Float public

Defined in m_maxForce:150

m_maxTorque

Float public

Defined in m_maxTorque:157

m_qA

B2Rot public

Defined in m_qA:108

m_qB

B2Rot public

Defined in m_qB:115

m_rA

B2Vec2 public

Defined in m_rA:80

m_rB

B2Vec2 public

Defined in m_rB:87