Class Index | File Index

Classes


Class R.components.physics.PolyBody


Extends R.components.physics.BaseBody.
An extension of R.components.BaseBody which creates a polygonal rigid body. The polygon must be a convex polygon.
Defined in: polybody.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
A polygonal 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 extents of the box's body.
 
Return the object to the pool.
 
setHostObject(hostObj)
Deprecated in favor of #setGameObject
Methods borrowed from class R.components.physics.BaseBody:
applyForce, applyImpulse, applyTorque, execute, getAngularDamping, getBody, getBodyDef, getCenter, getClassName, 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.PolyBody(name, points)
A polygonal rigid body component.
Parameters:
name
{String} Name of the component
points
{Array} An array of points defining the body shape
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}

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

release()
Return the object to the pool.

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)