Class Index | File Index

Classes


Class R.components.physics.BoxBody


Extends R.components.physics.BaseBody.
An extension of the R.components.BaseBody which creates a rectangular rigid body.
Defined in: boxbody.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
A rectangular rigid body component.
Fields borrowed from class R.components.physics.BaseBody:
DEFAULT_DENSITY, DEFAULT_FRICTION, DEFAULT_RESTITUTION
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
 
Destroy the object
 
Get a box which bounds the body, local to the body.
 
Get the class name of this object
 
Get the extents of the box's body.
 
Return the object to the pool.
 
setExtents(extents)
Set the extents of the box's body.
 
setHostObject(hostObj)
Deprecated in favor of #setGameObject
Methods borrowed from class R.components.physics.BaseBody:
applyForce, applyImpulse, applyTorque, execute, getAngularDamping, getBody, getBodyDef, getCenter, getDensity, getFixtureDef, getFriction, getLinearDamping, getLocalOrigin, getMass, getPosition, getRenderComponent, getRestitution, getRotation, isActive, isSleeping, isStatic, setActive, setDamping, setDensity, setFriction, setLocalOrigin, setMass, setPosition, setRenderComponent, setRestitution, setRotation, setStatic, startSimulation, stopSimulation, updateFixture, wakeUp
Methods borrowed from class R.components.Transform2D:
getLastPosition, getLastRenderPosition, getRenderPosition, getRenderRotation, getRenderScale, getRenderScaleX, getRenderScaleY, getScale, getScaleX, getScaleY, setLastPosition, setScale
Methods borrowed from class R.components.Base:
getGameObject, getHostObject, getPriority, getType, getTypeString, setGameObject, setPriority
Methods borrowed from class R.engine.BaseObject:
addEvent, addEvents, 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.BoxBody(name, extents)
A rectangular rigid body component.
Parameters:
name
{String} Name of the component
extents
{R.math.Vector2D} The full extents of the body along X and Y
Method Detail
destroy()
Destroy the object

{R.math.Rectangle2D} getBoundingBox()
Get a box which bounds the body, local to the body.
Returns:
{R.math.Rectangle2D}

{String} getClassName()
Get the class name of this object
Returns:
{String} "R.components.physics.BoxBody"

{R.math.Point2D} getExtents()
Get the extents of the box's body.
Returns:
{R.math.Point2D}

release()
Return the object to the pool.

setExtents(extents)
Set the extents of the box's body. Calling this method after the simulation of the body has started has no effect.
Parameters:
extents
{R.math.Point2D} The extents of the body along X and Y

setHostObject(hostObj)
Deprecated in favor of #setGameObject
Parameters:
hostObj

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