Appearance
Abstract Class: Joint
The base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.
Extended by
DistanceJointFrictionJointGearJointMotorJointMouseJointPrismaticJointPulleyJointRevoluteJointRopeJointWeldJointWheelJoint
Constructors
Constructor
new Joint(
def):Joint
Parameters
def
Returns
Joint
Constructor
new Joint(
def,bodyA,bodyB):Joint
Parameters
def
bodyA
bodyB
Returns
Joint
Properties
style
style:
Style={}
Styling for dev-tools.
Methods
getAnchorA()
abstractgetAnchorA():Vec2
Get the anchor point on bodyA in world coordinates.
Returns
getAnchorB()
abstractgetAnchorB():Vec2
Get the anchor point on bodyB in world coordinates.
Returns
getBodyA()
getBodyA():
Body
Get the first body attached to this joint.
Returns
getBodyB()
getBodyB():
Body
Get the second body attached to this joint.
Returns
getCollideConnected()
getCollideConnected():
boolean
Get collide connected. Note: modifying the collide connect flag won't work correctly because the flag is only checked when fixture AABBs begin to overlap.
Returns
boolean
getNext()
getNext():
Joint
Get the next joint the world joint list.
Returns
Joint
getReactionForce()
abstractgetReactionForce(inv_dt):Vec2
Get the reaction force on bodyB at the joint anchor in Newtons.
Parameters
inv_dt
number
Returns
getReactionTorque()
abstractgetReactionTorque(inv_dt):number
Get the reaction torque on bodyB in N*m.
Parameters
inv_dt
number
Returns
number
getType()
getType():
string
Get the type of the concrete joint.
Returns
string
getUserData()
getUserData():
unknown
Returns
unknown
initVelocityConstraints()
abstractinitVelocityConstraints(step):void
Parameters
step
Returns
void
isActive()
isActive():
boolean
Short-cut function to determine if either body is inactive.
Returns
boolean
setUserData()
setUserData(
data):void
Parameters
data
unknown
Returns
void
shiftOrigin()
shiftOrigin(
newOrigin):void
Shift the origin for any points stored in world coordinates.
Parameters
newOrigin
Returns
void
solvePositionConstraints()
abstractsolvePositionConstraints(step):boolean
This returns true if the position errors are within tolerance.
Parameters
step
Returns
boolean
solveVelocityConstraints()
abstractsolveVelocityConstraints(step):void
Parameters
step
Returns
void