b2FrictionJoint Class
Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
Constructor
b2FrictionJoint
(
-
frictionJointDef
Parameters:
-
frictionJointDef
B2FrictionJointDef
Item Index
Methods
- getAnchorA
- getAnchorB
- getLocalAnchorA
- getLocalAnchorB
- getMaxForce
- getMaxTorque
- getReactionForce
- getReactionTorque
- initVelocityConstraints
- setMaxForce
- setMaxTorque
- solvePositionConstraints
- solveVelocityConstraints
- create static
- destroy static
- getAnchorA
- getAnchorB
- getBodyA
- getBodyB
- getCollideConnected
- getNext
- getReactionForce
- getReactionTorque
- getType
- getUserData
- initVelocityConstraints
- isActive
- setUserData
- shiftOrigin
- solveVelocityConstraints
- solveVelocityConstraints
Properties
- m_angularImpulse
- m_angularMass
- m_indexA
- m_indexB
- m_invIA
- m_invIB
- m_invMassA
- m_invMassB
- m_K
- m_lalcA
- m_lalcB
- m_linearImpulse
- m_linearMass
- m_localAnchorA
- m_localAnchorB
- m_localCenterA
- m_localCenterB
- m_maxForce
- m_maxTorque
- m_qA
- m_qB
- m_rA
- m_rB
- m_bodyA
- m_bodyB
- m_collideConnected
- m_edgeA
- m_edgeB
- m_index
- m_islandFlag
- m_next
- m_prev
- m_type
- m_userData
- ParentClass
Methods
getAnchorA
(
B2Vec2 | Object
public
-
[out=b2Vec2]
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
B2Vec2 | Object:
out
getAnchorB
(
B2Vec2 | Object
public
-
[out=b2Vec2]
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
B2Vec2 | Object:
out
getLocalAnchorA
(
B2Vec2 | Object
public
-
[out=b2Vec2]
The local anchor point relative to bodyA's origin.
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
B2Vec2 | Object:
out
getLocalAnchorB
(
B2Vec2 | Object
public
-
[out=b2Vec2]
The local anchor point relative to bodyB's origin.
Parameters:
-
[out=b2Vec2]
B2Vec2 | Object= optionalreusable object
Returns:
B2Vec2 | Object:
out
getMaxForce
()
Float
public
Get the maximum friction force in N.
Returns:
Float:
getMaxTorque
()
Float
public
Get the maximum friction torque in N*m.
Returns:
Float:
getReactionForce
(
B2Vec2 | Object
public
-
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:
B2Vec2 | Object:
out
getReactionTorque
(
Float
public
-
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:
Float:
initVelocityConstraints
(
Void
public
-
data
Parameters:
-
data
B2SolverData
Returns:
Void:
setMaxForce
(
Void
public
-
force
Set the maximum friction force in N.
Parameters:
-
force
Float
Returns:
Void:
setMaxTorque
(
Void
public
-
torque
Set the maximum friction torque in N*m.
Parameters:
-
torque
Float
Returns:
Void:
solvePositionConstraints
(
Void
public
-
data
Parameters:
-
data
B2SolverData
Returns:
Void:
solveVelocityConstraints
(
Void
public
-
data
Parameters:
-
data
B2SolverData
Returns:
Void:
Properties
m_angularImpulse
Float
public
Default: 0.0
m_indexA
Int
public
Default: 0
m_indexB
Int
public
Default: 0
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