b2PrismaticJoint Class
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
Parameters:
-
prismaticJointDef
B2PrismaticJointDef
Item Index
Methods
- enableLimit
- enableMotor
- getAnchorB
- getAnchorB
- getJointSpeed
- getJointTranslation
- getLocalAnchorA
- getLocalAnchorB
- getLocalAxisA
- getLowerLimit
- getMaxMotorForce
- getMaxMotorForce
- getMotorSpeed
- getReactionForce
- getReactionTorque
- getReferenceAngle
- getUpperLimit
- initVelocityConstraints
- isLimitEnabled
- isMotorEnabled
- setLimits
- setMaxMotorForce
- setMotorSpeed
- solvePositionConstraints
- solveVelocityConstraints
- create static
- destroy static
- getAnchorA
- getAnchorB
- getBodyA
- getBodyB
- getCollideConnected
- getNext
- getReactionForce
- getReactionTorque
- getType
- getUserData
- initVelocityConstraints
- isActive
- setUserData
- shiftOrigin
- solveVelocityConstraints
- solveVelocityConstraints
Properties
- m_a1
- m_a2
- m_axis
- m_enableLimit
- m_enableMotor
- m_impulse
- m_invIA
- m_invIB
- m_invMassA
- m_invMassB
- m_K
- m_K2
- m_K3
- m_lalcA
- m_lalcB
- m_limitState
- m_localAnchorA
- m_localAnchorB
- m_localCenterA
- m_localCenterB
- m_localXAxisA
- m_localYAxisA
- m_lowerTranslation
- m_maxMotorForce
- m_motorImpulse
- m_motorMass
- m_motorSpeed
- m_perp
- m_qA
- m_qB
- m_rA
- m_rB
- m_refAngle
- m_s1
- m_s2
- m_upperTranslation
- m_bodyA
- m_bodyB
- m_collideConnected
- m_edgeA
- m_edgeB
- m_index
- m_islandFlag
- m_next
- m_prev
- m_type
- m_userData
- ParentClass
Methods
getAnchorB
-
[out=b2Vec2]
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
out
getAnchorB
-
[out=b2Vec2]
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
out
getJointSpeed
()
B2Vec2
public
Returns:
getJointTranslation
-
[out=b2Vec2]
The local joint axis relative to bodyA.
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
out
getLocalAnchorA
-
[out=b2Vec2]
The local anchor point relative to bodyA's origin.
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
out
getLocalAnchorB
-
[out=b2Vec2]
The local anchor point relative to bodyA's origin.
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
out
getLocalAxisA
-
[out=b2Vec2]
The local joint axis relative to bodyA.
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
out
getLowerLimit
()
Float
public
Returns:
getMaxMotorForce
-
invDeltaTime
Parameters:
-
invDeltaTime
Float
Returns:
getMaxMotorForce
()
Float
public
Returns:
getMotorSpeed
()
Float
public
Returns:
getReactionForce
-
invDeltaTime
-
[out=b2Vec2]
Get the reaction force given the inverse time step. Unit is N.
Parameters:
-
invDeltaTime
Float -
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
out
getReactionTorque
-
invDeltaTime
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:
getReferenceAngle
()
Float
public
The local joint axis relative to bodyA.
Returns:
getUpperLimit
()
Float
public
Returns:
initVelocityConstraints
-
data
Parameters:
-
data
B2SolverData
Returns:
setLimits
-
upper
-
lower
Parameters:
-
upper
Float -
lower
Float
Returns:
setMaxMotorForce
-
force
Parameters:
-
force
Float
Returns:
setMotorSpeed
-
speed
Parameters:
-
speed
Float
Returns:
solvePositionConstraints
-
data
Parameters:
-
data
B2SolverData
Returns:
solveVelocityConstraints
-
data
Parameters:
-
data
B2SolverData
Returns:
Properties
m_a1
Float
public
Default: 0.0
m_a2
Float
public
Default: 0.0
m_axis
B2Vec2
public
m_enableLimit
Float
public
m_impulse
B2Vec3
public
m_invIA
Float
public
Default: 0.0
m_invIB
Float
public
Default: 0.0
m_invMassA
Float
public
Default: 0.0
m_invMassB
Float
public
Default: 0.0
m_K
B2Mat33
public
m_K2
B2Mat22
public
m_K3
B2Mat33
public
m_lalcA
B2Vec2
public
m_lalcB
B2Vec2
public
m_limitState
Int
public
Default: b2Joint.e_inactiveLimit
m_localAnchorA
B2Vec2
public
m_localAnchorB
B2Vec2
public
m_localCenterA
B2Vec2
public
m_localCenterB
B2Vec2
public
m_localXAxisA
B2Vec2
public
m_localYAxisA
B2Vec2
public
m_lowerTranslation
Float
public
m_maxMotorForce
Float
public
m_motorImpulse
Float
public
Default: 0.0
m_motorMass
Float
public
Default: 0.0
m_motorSpeed
Float
public
m_perp
B2Vec2
public
m_qA
B2Rot
public
m_qB
B2Rot
public
m_rA
B2Vec2
public
m_rB
B2Vec2
public
m_refAngle
Float
public
m_s1
Float
public
Default: 0.0
m_s2
Float
public
Default: 0.0