Fork me on GitHub

API Documentation


Extends GLGE.Group, GLGE.JSONLoader, GLGE.QuickNotation.
Scene class containing the camera, lights and objects
Defined in: glge_scene.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
GLGE.Scene(uid)
Method Summary
Method Attributes Method Name and Description
 
 
Add a new physics constraint to the scene
 
applyFilter(gl, renderObject, framebuffer)
 
Gets the scenes ambient light
 
Gets the scenes background color
 
Gets the scenes active camera
 
Gets the Culling Flag
 
getFilter2d(filter)
gets the 2d filter being applied apply
 
Gets the fog color
 
Gets the far fog distance
 
Gets the near fog distance
 
Gets the fog falloff type
 
getGravity(gravity)
Gets the gravity of the physics system
 
retrives the phsyics assets from the scene
 
getSkyFilter(filter)
gets the sky filter
 
makeRay(x, y)
Returns an object containing origin and coord, starting from the camera and pointing towards (x,y)
 
physicsPick(x, y, self)
Picks within the physics system
 
physicsPickObject(x, y, self)
Picks a single objectwithin the physics system
 
physicsTick(dt, noIntegrate)
Integrate the phsyics system
 
pick(x, y)
Picks and object from canvas coords
 
ray(origin, direction)
ray query from origin in the given direction
 
Removes a physics constraint to the scene
 
segmentTest(start, delta, self)
Does and intesection test on a given segment
 
Sets the scenes ambient light
 
Sets the scenes ambient light
 
Sets the scenes ambient light
 
Sets the scenes ambient light
 
Sets the scenes background color
 
setCamera(camera)
Sets the active camera for this scene
 
setCull(cull)
Sets the Culling Flag
 
setFilter2d(filter)
sets the 2d filter to apply
 
setFogColor(color)
Sets the scenes fog color
 
setFogFar(dist)
Sets the scenes fog far distance
 
setFogNear(dist)
Sets the scenes fog near distance
 
setFogType(type)
Sets the scenes fog falloff type
 
setGravity(gravity)
Sets the gravity of the physics system
 
setSkyFilter(filter)
sets the sky filter to apply
<static>  
GLGE.Scene.sortFunc(a, b)
sort function
Methods borrowed from class GLGE.Group:
addChild, 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, getModelMatrix, 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.Scene(uid)
Parameters:
uid
Method Detail
addParticleSystem(the)

Defined in: glge_particles.js.
Parameters:
{GLGE.ParticleSystem} the
particle system to add

addPhysicsConstraintPoint(constraint)
Add a new physics constraint to the scene
Defined in: glge_physicsconstraintpoint.js.
Parameters:
{GLGE.PhysicsConstraintPoint} constraint
The constraint to add to the scene

applyFilter(gl, renderObject, framebuffer)
Parameters:
gl
renderObject
framebuffer

{object} getAmbientColor()
Gets the scenes ambient light
Returns:
{object} An assoiative array r,g,b

{object} getBackgroundColor()
Gets the scenes background color
Returns:
{object} An assoiative array r,g,b

{GLGE.Camera} getCamera()
Gets the scenes active camera
Returns:
{GLGE.Camera} The current camera

getCull()
Gets the Culling Flag

{GLGE.Filter2d} getFilter2d(filter)
gets the 2d filter being applied apply
Parameters:
filter
Returns:
{GLGE.Filter2d}

{object} getFogColor()
Gets the fog color
Returns:
{object} An assoiative array r,g,b

{number} getFogFar()
Gets the far fog distance
Returns:
{number} the far distance of the fog

{number} getFogNear()
Gets the near fog distance
Returns:
{number} the near distance of the fog

{number} getFogType()
Gets the fog falloff type
Returns:
{number} the far falloff type

{number} getGravity(gravity)
Gets the gravity of the physics system
Defined in: glge_physicsext.js.
Parameters:
gravity
Returns:
{number}

{array} getPhysicsNodes(ret)
retrives the phsyics assets from the scene
Defined in: glge_physicsext.js.
Parameters:
ret
Returns:
{array} the physics assets

{GLGE.Filter2d} getSkyFilter(filter)
gets the sky filter
Parameters:
filter
Returns:
{GLGE.Filter2d}

makeRay(x, y)
Returns an object containing origin and coord, starting from the camera and pointing towards (x,y)
Parameters:
x
the canvas x coord to pick
y
the canvas y coord to pick

physicsPick(x, y, self)
Picks within the physics system
Defined in: glge_physicsext.js.
Parameters:
{number} x
screen x coord
{number} y
screen y coord
{object} self
optionally don't pick self
Returns:
picking result

physicsPickObject(x, y, self)
Picks a single objectwithin the physics system
Defined in: glge_physicsext.js.
Parameters:
{number} x
screen x coord
{number} y
screen y coord
{object} self
the object to perform the pick on
Returns:
picking result

physicsTick(dt, noIntegrate)
Integrate the phsyics system
Defined in: glge_physicsext.js.
Parameters:
{number} dt
the delta time to integrate for
noIntegrate

pick(x, y)
Picks and object from canvas coords
Parameters:
x
the canvas x coord to pick
y
the canvas y coord to pick

ray(origin, direction)
ray query from origin in the given direction
Parameters:
origin
the source of the ray
direction
the direction of the ray

removePhysicsConstraintPoint(constraint)
Removes a physics constraint to the scene
Defined in: glge_physicsconstraintpoint.js.
Parameters:
{GLGE.PhysicsConstraintPoint} constraint
The constraint to remove from the scene

segmentTest(start, delta, self)
Does and intesection test on a given segment
Defined in: glge_physicsext.js.
Parameters:
{array} start
starting position of segment
{array} delta
the segment delta
self
Returns:
segment test result object {object,normal,distance,position}

setAmbientColor(color)
Sets the scenes ambient light
Parameters:
{string} color
The ambient light color

setAmbientColorB(value)
Sets the scenes ambient light
Parameters:
{number} value
the blue componenent of the ambient light 0-1

setAmbientColorG(value)
Sets the scenes ambient light
Parameters:
{number} value
the green componenent of the ambient light 0-1

setAmbientColorR(value)
Sets the scenes ambient light
Parameters:
{number} value
the red componenent of the ambient light 0-1

setBackgroundColor(color)
Sets the scenes background color
Parameters:
{string} color
The backgorund color

setCamera(camera)
Sets the active camera for this scene
Parameters:
camera

setCull(cull)
Sets the Culling Flag
Parameters:
cull

setFilter2d(filter)
sets the 2d filter to apply
Parameters:
{GLGE.Filter2d} filter
the filter to apply when rendering the scene

setFogColor(color)
Sets the scenes fog color
Parameters:
{string} color
The fog color

setFogFar(dist)
Sets the scenes fog far distance
Parameters:
{number} dist
The fog far distance

setFogNear(dist)
Sets the scenes fog near distance
Parameters:
{number} dist
The fog near distance

setFogType(type)
Sets the scenes fog falloff type
Parameters:
{number} type
The fog falloff type FOG_NONE,FOG_LINEAR,FOG_QUADRATIC

setGravity(gravity)
Sets the gravity of the physics system
Defined in: glge_physicsext.js.
Parameters:
{number} gravity
the gravity to apply to the physics system

setSkyFilter(filter)
sets the sky filter to apply
Parameters:
{GLGE.Filter2d} filter
tthe filter used to render the sky

<static> GLGE.Scene.sortFunc(a, b)
sort function
Parameters:
a
b

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