Class Index | File Index

Classes


Class c3dl.Actor

c3dl.Actor is a base class for 3D objects.
Defined in: actor.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Get the angular velocity of the Actor.
 
Get the direction of the actor, where the actor is 'pointing' or looking'.
 
Get the left Vector of the actor.
 
Get the linear velocity of the Actor.
 
Get the name of this actor.
<static>  
c3dl.Actor.getObjectType()
 
Get the position of the Actor relative to the world origin.
 
Get the scale factor of the Actor.
 
Get the transformation of this node.
 
The the Up Vector of the actor.
 
pitch(angle)
Rotate around the Side Vector by a hard amount (No Animation)
 
 
roll(angle)
Rotate around the Dir Vector by a hard amount (No Animation)
 
rotateOnAxis(axisVec, angle)
Rotate Actor on an axis which is centered on the position of the Actor.
 
scale(scaleVec)
Scale the Actor relative to its current scaling value.
 
setAngularVel(newVec)
Set a new Angular Veclocity that will be added to the rotation on every update.
 
setForward(newVec)
Set the point in space where the Actor will look at (No Animation).
 
setLinearVel(newVec)
Set a new Linear Velocity that will be added to the Position on every update
 
setName(name)
Set the name of this actor.
 
setPosition(vecPos)
Set the new location of the Actor.
 
Set the transformation of this actor.
 
setUpVector(newVec)
Set the orientation of Up (No Animation)
 
translate(translation)
Move the object relative to where it is currently, not relative to the origin.
 
yaw(angle)
Rotate around the Up Vector by a hard amount (No Animation)
Class Detail
c3dl.Actor()
Method Detail
{Array} getAngularVel()
Get the angular velocity of the Actor.
Returns:
{Array} The angular velocity of the Actor.

{Array} getDirection()
Get the direction of the actor, where the actor is 'pointing' or looking'.
Returns:
{Array} The direction of the actor.

{Array} getLeft()
Get the left Vector of the actor.
Returns:
{Array} The left Vector of the actor.

{Array} getLinearVel()
Get the linear velocity of the Actor.
Returns:
{Array} The linear velocity of the Actor.

{String} getName()
Get the name of this actor.
Returns:
{String} actor's name

<static> c3dl.Actor.getObjectType()

{Array} getPosition()
Get the position of the Actor relative to the world origin.
Returns:
{Array} The position of the Actor.

{Array} getScale()
Get the scale factor of the Actor. It has a default value of (1,1,1) when created.
Returns:
{Array} The scale amount of the Actor.

{Array} getTransform()
Get the transformation of this node. Keep in mind that if this node is 'animated', the matrix will be changing with each update(). In that case, the matrix this function returns will the the state the matrix is in at the time the function is called.
Returns:
{Array}

{Array} getUp()
The the Up Vector of the actor.
Returns:
{Array} The up Vector of the actor.

pitch(angle)
Rotate around the Side Vector by a hard amount (No Animation)
Parameters:
{float} angle
in radians.

resetTransform()

roll(angle)
Rotate around the Dir Vector by a hard amount (No Animation)
Parameters:
{float} angle
in radians.

rotateOnAxis(axisVec, angle)
Rotate Actor on an axis which is centered on the position of the Actor.
Parameters:
{Array} axisVec
{float} angle
in radians.

scale(scaleVec)
Scale the Actor relative to its current scaling value. Attempts to scale the x, y or z values of the Actor less than or equal to zero will be ignored.
Parameters:
{Array} scaleVec
The amount to scale the Actor.

setAngularVel(newVec)
Set a new Angular Veclocity that will be added to the rotation on every update.
Parameters:
{Array} newVec

setForward(newVec)
Set the point in space where the Actor will look at (No Animation).
Parameters:
{Array} newVec

setLinearVel(newVec)
Set a new Linear Velocity that will be added to the Position on every update
Parameters:
{Array} newVec

setName(name)
Set the name of this actor.
Parameters:
{String} name
The new name of for this actor.

setPosition(vecPos)
Set the new location of the Actor.
Parameters:
{Array} vecPos
A vector containing the new location for the actor.

setTransform(mat)
Set the transformation of this actor.
Parameters:
{Array} mat

setUpVector(newVec)
Set the orientation of Up (No Animation)
Parameters:
{Array} newVec

translate(translation)
Move the object relative to where it is currently, not relative to the origin.
Parameters:
{Array} translation
A vector which represents how far away to move the actor from its current location.

yaw(angle)
Rotate around the Up Vector by a hard amount (No Animation)
Parameters:
{float} angle
in radians.

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Feb 19 2010 16:57:36 GMT-0500 (EST)