Class Index | File Index

Classes


Class R.components.physics.PulleyJoint


Extends R.components.physics.BaseJoint.
A pulley joint which links two bodies together via a pulley in a R.physics.Simulation.
Defined in: pulleyjoint.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
R.components.physics.PulleyJoint(name, body1, body2, anchor1, anchor2, ratio)
Creates a pulley joint between two physical bodies.
Fields borrowed from class R.components.Base:
TYPE_COLLIDER, TYPE_INPUT, TYPE_LOGIC, TYPE_RENDERING, TYPE_TRANSFORM
Method Summary
Method Attributes Method Name and Description
 
Get the class name of this object
 
offset(pt)
Offset the joint's anchors by the given point
Methods borrowed from class R.components.physics.BaseJoint:
getBody1, getBody2, getCollideBodies, getJoint, getJointDef, getSimulation, 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.PulleyJoint(name, body1, body2, anchor1, anchor2, ratio)
Creates a pulley 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
anchor1
{R.math.Point2D} A point, in world coordinates relative to the two bodies, to use as one of the joint's anchor points
anchor2
{R.math.Point2D} A point, in world coordinates relative to the two bodies, to use as one of the joint's anchor points
ratio Optional, Default: 1
{Number} The ratio between the two anchors.
Method Detail
{String} getClassName()
Get the class name of this object
Returns:
{String} "R.components.physics.PulleyJoint"

offset(pt)
Offset the joint's anchors by the given point
Parameters:
pt
{R.math.Point2D} The offset amount

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:17 GMT-0400 (EDT)