API Documentation for:
Show:

b2WheelJoint Class

Extends b2Joint
Defined in: b2WheelJoint:17
Module: Joints

Constructor

b2WheelJoint

(
  • wheelJointDef
)

Defined in b2WheelJoint:17

Parameters:

  • wheelJointDef B2WheelJointDef

Methods

enableMotor

(
  • flag
)
Void public

Defined in enableMotor:560

Set the target angular offset, in radians.

Parameters:

Returns:

Void:

getAnchorB

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

Defined in getAnchorB:431

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getAnchorB

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

Defined in getAnchorB:442

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getJointTranslation

() Float public

Get the position correction factor in the range [0,1].

Returns:

Float:

getLinearOffset

() Boolean public

Defined in getLinearOffset:551

Returns:

getLocalAnchorA

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

Defined in getLocalAnchorA:483

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

The local anchor point relative to bodyA's origin.

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getLocalAxisA

(
  • out
)
Float public

Defined in getLocalAxisA:509

The local joint axis relative to bodyA.

Parameters:

  • out Float

Returns:

Float:

getMaxMotorTorque

() Float public

Get the maximum friction torque in N*m.

Returns:

Float:

getMotorSpeed

() Float public

Defined in getMotorSpeed:615

Get the motor speed, usually in radians per second.

Returns:

Float:

getMotorTorque

(
  • invDeltaTime
)
Float public

Defined in getMotorTorque:602

Get the current motor torque given the inverse time step, usually in N-m.

Parameters:

  • invDeltaTime Float

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:

getSpringFrequencyHz

() Float public

Returns:

Float:

getSpringFrequencyHz

() Float public

Returns:

Float:

initVelocityConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

setMaxMotorTorque

(
  • torque
)
Float public

Set the maximum motor force, usually in N-m.

Parameters:

  • torque Float

Returns:

Float:

setMotorSpeed

(
  • speed
)
Void public

Defined in setMotorSpeed:574

Set the motor speed, usually in radians per second.

Parameters:

  • speed B2Vec2 | Object=

Returns:

Void:

setSpringDampingRatio

(
  • ratio
)
Float public

Parameters:

  • ratio Float

Returns:

Float:

setSpringFrequencyHz

(
  • hz
)
Float public

Parameters:

  • hz Float

Returns:

Float:

solveVelocityConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

Properties

m_ax

B2Vec2 public

Defined in m_ax:96

m_ay

B2Vec2 public

Defined in m_ay:104

m_bias

Float public

Defined in m_bias:374

Default: 0.0

m_dampingRatio

Float public

Defined in m_dampingRatio:170

m_enableLimit

Boolean public

Defined in m_enableLimit:202

Default: false

m_enableMotor

Boolean public

Defined in m_enableMotor:211

Default: false

m_frequencyHz

Float public

Defined in m_frequencyHz:178

m_gamma

Float public

Defined in m_gamma:383

Default: 0.0

m_impulse

Float public

Defined in m_impulse:237

Default: 0.0

m_indexA

Int public

Defined in m_indexA:266

Default: 0

m_indexB

Int public

Defined in m_indexB:275

Default: 0

m_invIA

Float public

Defined in m_invIA:302

Default: 0.0

m_invIB

Float public

Defined in m_invIB:311

Default: 0.0

m_invMassA

Float public

Defined in m_invMassA:284

Default: 0.0

m_invMassB

Float public

Defined in m_invMassB:293

Default: 0.0

m_lalcA

B2Vec2 public

Defined in m_lalcA:128

m_lalcB

B2Vec2 public

Defined in m_lalcB:136

m_limitState

Int public

Defined in m_limitState:220

m_localAnchorA

B2Vec2 public

Defined in m_localAnchorA:48

m_localAnchorB

B2Vec2 public

Defined in m_localAnchorB:56

m_localCenterA

B2Vec2 public

Defined in m_localCenterA:80

m_localCenterB

B2Vec2 public

Defined in m_localCenterB:88

m_localXAxisA

B2Vec2 public

Defined in m_localXAxisA:64

m_localYAxisA

B2Vec2 public

Defined in m_localYAxisA:72

m_mass

Float public

Defined in m_mass:356

Default: 0.0

m_maxMotorForce

Float public

Defined in m_maxMotorForce:186

m_motorImpulse

Float public

Defined in m_motorImpulse:246

Default: 0.0

m_motorMass

Float public

Defined in m_motorMass:228

Default: 0.0

m_motorSpeed

Float public

Defined in m_motorSpeed:194

m_qA

B2Rot public

Defined in m_qA:112

m_qB

B2Rot public

Defined in m_qB:120

m_rA

B2Vec2 public

Defined in m_rA:144

m_rB

B2Vec2 public

Defined in m_rB:152

m_sAx

Float public

Defined in m_sAx:320

Default: 0.0

m_sAy

Float public

Defined in m_sAy:338

Default: 0.0

m_sBx

Float public

Defined in m_sBx:329

Default: 0.0

m_sBy

Float public

Defined in m_sBy:347

Default: 0.0

m_springImpulse

Float public

Defined in m_springImpulse:255

Default: 0.0

m_springMass

Float public

Defined in m_springMass:365

Default: 0.0