Class R.components.physics.PrismaticJoint
Extends
R.components.physics.BaseMotorJoint.
A prismatic joint which allows movement in one degree of freedom: translation along
an axis anchored in the first body. The joint limits relative rotations.
Defined in: prismaticjoint.js.
Constructor Attributes | Constructor Name and Description |
---|---|
R.components.physics.PrismaticJoint(name, body1, body2, anchor, axis)
Creates a prismatic joint between two physical bodies.
|
- Fields borrowed from class R.components.Base:
- TYPE_COLLIDER, TYPE_INPUT, TYPE_LOGIC, TYPE_RENDERING, TYPE_TRANSFORM
Method Attributes | Method Name and Description |
---|---|
Get the class name of this object
|
- Methods borrowed from class R.components.physics.BaseMotorJoint:
- clearForce, getMotorForce, getMotorSpeed, getReactionForce, getReactionTorque, setMotorForce, setMotorSpeed
- Methods borrowed from class R.components.physics.BaseJoint:
- getBody1, getBody2, getCollideBodies, getJoint, getJointDef, getSimulation, offset, setBody1, setBody2, setCollideBodies, startSimulation, stopSimulation
- Methods borrowed from class R.components.Base:
- execute, getGameObject, getHostObject, getPriority, getType, getTypeString, release, setGameObject, setHostObject, setPriority
- Methods borrowed from class R.engine.BaseObject:
- addEvent, addEvents, destroy, getElement, jQ, removeEvent, setElement, triggerEvent, update
- Methods borrowed from class R.engine.PooledObject:
- clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.components.physics.PrismaticJoint(name, body1, body2, anchor, axis)
Creates a prismatic joint between two physical bodies.
- Parameters:
- name
- {String} Name of the component
- body1
- {R.components.physics.BaseBody} The first body for the joint
- body2
- {R.components.physics.BaseBody} The second body for the joint
- anchor
- {R.math.Point2D} A point, in world coordinates relative to the two bodies, to use as the joint's anchor point
- axis Optional
- {R.math.Vector2D} The axis of translation. If
null
the "up" vector is applied.
Method Detail
{String}
getClassName()
Get the class name of this object
- Returns:
- {String} "R.components.physics.PrismaticJoint"