Class Index | File Index

Classes


Class GLGE.Scene

Scene class containing the camera, lights and objects
Defined in: glge.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
addLight(light)
Adds a light source to the scene
 
addObject(object)
Adds an object to the scene
 
Gets the scenes ambient light
 
Gets the scenes background color
 
Gets the scenes active camera
 
Gets an array of all the light sources in the scene
 
Gets an array of all the object in the scene
 
setAmbientColor(r, g, b)
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
Class Detail
GLGE.Scene()
Method Detail
{Number} addLight(light)
Adds a light source to the scene
Parameters:
light
Returns:
{Number} The index of the added light

{Number} addObject(object)
Adds an object to the scene
Parameters:
object
Returns:
{Number} The index of the added object

{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

{GLGE.Lights[]} getLights()
Gets an array of all the light sources in the scene
Returns:
{GLGE.Lights[]} An array of lights

{GLGE.Object[]} getObjects()
Gets an array of all the object in the scene
Returns:
{GLGE.Object[]} An array of objects

setAmbientColor(r, g, b)
Sets the scenes ambient light
Parameters:
{number} r
the red componenent of the ambient light 0-1
{number} g
the green componenent of the ambient light 0-1
{number} b
the blue componenent of the ambient light 0-1

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(r, g, b)
Sets the scenes background color
Parameters:
{number} r
the red componenent of the background color 0-1
{number} g
the green componenent of the background color 0-1
{number} b
the blue componenent of the background color 0-1

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

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Dec 21 2009 20:52:55 GMT-0000 (GMT)