Fork me on GitHub

API Documentation


Extends GLGE.Group.
An abstract class used when constructing jiglib rigidbodies
Defined in: glge_physicsabstract.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Add forces in the body coordinate frame
 
Add torque in the body coordinate frame
 
Add forces in the world coordinate frame
 
Add torque in the world coordinate frame
 
Remove active force and torque
 
Gets the angular velocity of the physics body
 
Gets the x-axis angular velocity of the physics body
 
Gets the y-axis angular velocity of the physics body
 
Gets the z-axis angular velocity of the physics body
 
Gets the friction for the object
 
Gets the linear velocity damping
 
Gets the mass for the object
 
Gets the model matrix to transform the model within the world
 
Gets the movable flag for the object
 
Gets the restitution for the object
 
Gets the rotational velocity Damping
 
getType(value)
Gets the physics type either GLGE.PHYSICS_ALL or GLGE.PHYSICS_LOC
 
Gets the velocity of the physics body
 
Gets the x velocity of the physics body
 
Gets the y velocity of the physics body
 
Gets the z velocity of the physics body
 
function run before proceeding with the physics sim
 
Sets the angular velocity of the physics body
 
Sets the x-axis angular velocity of the physics body
 
Sets the y-axis angular velocity of the physics body
 
Sets the z-axis angular velocity of the physics body
 
setFriction(value)
Sets the friction for the object
 
Sets the linear velocity damping
 
setMass(value)
Sets the mass for the object
 
setMovable(value)
Sets the movable flag for the object
 
Sets the restitution for the object
 
Sets the rotational velocity Damping
 
setType(value)
Sets the physics type either GLGE.PHYSICS_ALL or GLGE.PHYSICS_LOC
 
setVelocity(value, local)
Sets the velocity of the physics body
 
setVelocityX(value)
Sets the x velocity of the physics body
 
setVelocityY(value)
Sets the y velocity of the physics body
 
setVelocityZ(value)
Sets the z velocity of the physics body
Methods borrowed from class GLGE.Group:
addChild, addParticleSystem, downloadComplete, getBoundingVolume, getChildren, getLights, getNames, getObjects, getPickable, getVisible, isComplete, removeChild, setAction, setPickable, setVisible, updateAllPrograms
Methods borrowed from class GLGE.Animatable:
animate, blendTo, getAnimation, getBlendFunction, getFrameNumber, getFrameRate, getLoop, getName, getPaused, isLooping, setAnimation, setBlendFunction, setFrameRate, setLoop, setName, setPaused, setStartFrame, togglePaused
Methods borrowed from class GLGE.Events:
addEventListener, fireEvent, removeEventListener
Methods borrowed from class GLGE.Placeable:
clearStaticMatrix, getDLocX, getDLocY, getDLocZ, getDRotX, getDRotY, getDRotZ, getDScaleX, getDScaleY, getDScaleZ, getId, getInverseModelMatrix, getLocalMatrix, getLocX, getLocY, getLocZ, getLookat, getPosition, getQuatW, getQuatX, getQuatY, getQuatZ, getRef, getRoot, getRotation, getRotMatrix, getRotOrder, getRotX, getRotY, getRotZ, getScale, getScaleMatrix, getScaleX, getScaleY, getScaleZ, getTranslateMatrix, getTransposeInverseModelMatrix, getTransposeModelMatrix, getUpAxis, Lookat, move, setDLoc, setDLocX, setDLocY, setDLocZ, setDRot, setDRotX, setDRotY, setDRotZ, setDScale, setDScaleX, setDScaleY, setDScaleZ, setId, setLoc, setLocX, setLocY, setLocZ, setLookat, setQuat, setQuatW, setQuatX, setQuatY, setQuatZ, setRot, setRotMatrix, setRotOrder, setRotX, setRotY, setRotZ, setScale, setScaleX, setScaleY, setScaleZ, setStaticMatrix, setTransformMode, setUpAxis
Methods borrowed from class GLGE.QuickNotation:
_
Methods borrowed from class GLGE.JSONLoader:
getDownloadPriority, setDownloadPriority, setJSONSrc, setJSONString
Events borrowed from class GLGE.Group:
childAdded, childRemoved, downloadComplete
Events borrowed from class GLGE.Animatable:
animFinished
Events borrowed from class GLGE.Placeable:
appened, childMatrixUpdate, matrixUpdate, removed
Class Detail
GLGE.PhysicsAbstract(uid)
Parameters:
uid
Method Detail
addBodyForce(f, p)
Add forces in the body coordinate frame
Parameters:
{array} f
force expressed as a 3D vector
{array} p
position of origin of the force expressed as a 3D vector

addBodyTorque(t)
Add torque in the body coordinate frame
Parameters:
{array} t
torque expressed as a 3D vector

addWorldForce(f, p)
Add forces in the world coordinate frame
Parameters:
{array} f
force expressed as a 3D vector
{array} p
position of origin of the force expressed as a 3D vector

addWorldTorque(t)
Add torque in the world coordinate frame
Parameters:
{array} t
torque expressed as a 3D vector

clearForces()
Remove active force and torque

{array} getAngularVelocity()
Gets the angular velocity of the physics body
Returns:
{array} The velocity to set

{number} getAngularVelocityX()
Gets the x-axis angular velocity of the physics body
Returns:
{number} The x velocity to set

{number} getAngularVelocityY()
Gets the y-axis angular velocity of the physics body
Returns:
{number} The y velocity to set

{number} getAngularVelocityZ()
Gets the z-axis angular velocity of the physics body
Returns:
{number} The z velocity to set

{number} getFriction()
Gets the friction for the object
Returns:
{number} The friction

getLinearVelocityDamping(v)
Gets the linear velocity damping
Parameters:
v
Returns:
3D vector for linear damping

{number} getMass()
Gets the mass for the object
Returns:
{number} The mass

getModelMatrix()
Gets the model matrix to transform the model within the world

{boolean} getMovable()
Gets the movable flag for the object
Returns:
{boolean} The movable flag

{number} getRestitution()
Gets the restitution for the object
Returns:
{number} The restitution

getRotationalVelocityDamping(v)
Gets the rotational velocity Damping
Parameters:
v
Returns:
3D vector for rotational damping

getType(value)
Gets the physics type either GLGE.PHYSICS_ALL or GLGE.PHYSICS_LOC
Parameters:
value

{array} getVelocity()
Gets the velocity of the physics body
Returns:
{array} The velocity to set

{number} getVelocityX()
Gets the x velocity of the physics body
Returns:
{number} The x velocity to set

{number} getVelocityY()
Gets the y velocity of the physics body
Returns:
{number} The y velocity to set

{number} getVelocityZ()
Gets the z velocity of the physics body
Returns:
{number} The z velocity to set

preProcess(dt)
function run before proceeding with the physics sim
Parameters:
dt

setAngularVelocity(value)
Sets the angular velocity of the physics body
Parameters:
{array} value
The velocity to set

setAngularVelocityX(value)
Sets the x-axis angular velocity of the physics body
Parameters:
{number} value
The x velocity to set

setAngularVelocityY(value)
Sets the y-axis angular velocity of the physics body
Parameters:
{number} value
The y velocity to set

setAngularVelocityZ(value)
Sets the z-axis angular velocity of the physics body
Parameters:
{number} value
The z velocity to set

setFriction(value)
Sets the friction for the object
Parameters:
{number} value
The friction 0-1

setLinearVelocityDamping(damping)
Sets the linear velocity damping
Parameters:
{array} damping
3D vector for linear damping

setMass(value)
Sets the mass for the object
Parameters:
{number} value
The mass

setMovable(value)
Sets the movable flag for the object
Parameters:
{boolean} value
The movable flag

setRestitution(value)
Sets the restitution for the object
Parameters:
{number} value
The restitution 0-1

setRotationalVelocityDamping(damping)
Sets the rotational velocity Damping
Parameters:
{array} damping
3D vector for rotational damping

setType(value)
Sets the physics type either GLGE.PHYSICS_ALL or GLGE.PHYSICS_LOC
Parameters:
{number} value
the enumerations for physics type

setVelocity(value, local)
Sets the velocity of the physics body
Parameters:
{array} value
The velocity to set
local

setVelocityX(value)
Sets the x velocity of the physics body
Parameters:
{number} value
The x velocity to set

setVelocityY(value)
Sets the y velocity of the physics body
Parameters:
{number} value
The y velocity to set

setVelocityZ(value)
Sets the z velocity of the physics body
Parameters:
{number} value
The z velocity to set

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 12 2012 14:20:23 GMT+0000 (GMT)