Class Index | File Index

Classes


Class R.components.physics.WeldJoint


Extends R.components.physics.BaseJoint.
A weld joint effectively welds two bodies together at a given point in a R.physics.Simulation.
Defined in: weldjoint.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
R.components.physics.WeldJoint(name, body1, body2, anchor)
Creates a weld 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.WeldJoint(name, body1, body2, anchor)
Creates a weld joint between two physical bodies. The location of the weld is described by the anchor position. When the first or second body is acted upon, the other body is also affected.
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 Optional
{R.math.Point2D} The anchor point on body1, or null to use the body's position
Method Detail
{String} getClassName()
Get the class name of this object
Returns:
{String} "R.components.physics.WeldJoint"

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)