API Documentation for:
Show:

b2PrismaticJoint Class

Extends b2Joint
Defined in: b2PrismaticJoint:17
Module: Joints

A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in bodyA. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.

Constructor

b2PrismaticJoint

(
  • prismaticJointDef
)

Defined in b2PrismaticJoint:17

Parameters:

  • prismaticJointDef B2PrismaticJointDef

Methods

enableLimit

(
  • flag
)
Void public

Defined in enableLimit:568

Parameters:

Returns:

Void:

enableMotor

(
  • flag
)
Void public

Defined in enableMotor:630

Parameters:

Returns:

Void:

getAnchorB

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

Defined in getAnchorB:403

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getAnchorB

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

Defined in getAnchorB:414

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getJointSpeed

() B2Vec2 public

Defined in getJointSpeed:523

Returns:

B2Vec2:

getJointTranslation

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

The local joint axis relative to bodyA.

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getLocalAnchorA

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

Defined in getLocalAnchorA:456

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

The local anchor point relative to bodyA's origin.

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getLocalAxisA

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

Defined in getLocalAxisA:499

The local joint axis relative to bodyA.

Parameters:

  • [out=b2Vec2] B2Vec2 | Object= optional

    reusable object

Returns:

B2Vec2 | Object:

out

getLowerLimit

() Float public

Defined in getLowerLimit:583

Returns:

Float:

getMaxMotorForce

(
  • invDeltaTime
)
Float public

Parameters:

  • invDeltaTime Float

Returns:

Float:

getMaxMotorForce

() Float public

Returns:

Float:

getMotorSpeed

() Float public

Defined in getMotorSpeed:655

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:

getReferenceAngle

() Float public

The local joint axis relative to bodyA.

Returns:

Float:

getUpperLimit

() Float public

Defined in getUpperLimit:593

Returns:

Float:

initVelocityConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

isLimitEnabled

() Boolean public

Defined in isLimitEnabled:559

Returns:

isMotorEnabled

() Boolean public

Defined in isMotorEnabled:621

Returns:

setLimits

(
  • upper
  • lower
)
Void public

Defined in setLimits:603

Parameters:

  • upper Float
  • lower Float

Returns:

Void:

setMaxMotorForce

(
  • force
)
Void public

Parameters:

  • force Float

Returns:

Void:

setMotorSpeed

(
  • speed
)
Void public

Defined in setMotorSpeed:642

Parameters:

  • speed Float

Returns:

Void:

solvePositionConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

solveVelocityConstraints

(
  • data
)
Void public

Parameters:

  • data B2SolverData

Returns:

Void:

Properties

m_a1

Float public

Defined in m_a1:306

Default: 0.0

m_a2

Float public

Defined in m_a2:315

Default: 0.0

m_axis

B2Vec2 public

Defined in m_axis:109

m_enableLimit

Float public

Defined in m_enableLimit:245

m_enableMotor

Boolean public

Defined in m_enableMotor:253

m_impulse

B2Vec3 public

Defined in m_impulse:85

m_invIA

Float public

Defined in m_invIA:324

Default: 0.0

m_invIB

Float public

Defined in m_invIB:333

Default: 0.0

m_invMassA

Float public

Defined in m_invMassA:342

Default: 0.0

m_invMassB

Float public

Defined in m_invMassB:351

Default: 0.0

m_K

B2Mat33 public

Defined in m_K:125

m_K2

B2Mat22 public

Defined in m_K2:133

m_K3

B2Mat33 public

Defined in m_K3:141

m_lalcA

B2Vec2 public

Defined in m_lalcA:165

m_lalcB

B2Vec2 public

Defined in m_lalcB:173

m_limitState

Int public

Defined in m_limitState:279

Default: b2Joint.e_inactiveLimit

m_localAnchorA

B2Vec2 public

Defined in m_localAnchorA:53

m_localAnchorB

B2Vec2 public

Defined in m_localAnchorB:61

m_localCenterA

B2Vec2 public

Defined in m_localCenterA:93

m_localCenterB

B2Vec2 public

Defined in m_localCenterB:101

m_localXAxisA

B2Vec2 public

Defined in m_localXAxisA:69

m_localYAxisA

B2Vec2 public

Defined in m_localYAxisA:77

m_lowerTranslation

Float public

m_maxMotorForce

Float public

Defined in m_maxMotorForce:229

m_motorImpulse

Float public

Defined in m_motorImpulse:270

Default: 0.0

m_motorMass

Float public

Defined in m_motorMass:261

Default: 0.0

m_motorSpeed

Float public

Defined in m_motorSpeed:237

m_perp

B2Vec2 public

Defined in m_perp:117

m_qA

B2Rot public

Defined in m_qA:149

m_qB

B2Rot public

Defined in m_qB:157

m_rA

B2Vec2 public

Defined in m_rA:181

m_rB

B2Vec2 public

Defined in m_rB:189

m_refAngle

Float public

Defined in m_refAngle:205

m_s1

Float public

Defined in m_s1:288

Default: 0.0

m_s2

Float public

Defined in m_s2:297

Default: 0.0

m_upperTranslation

Float public