Class Index | File Index

Classes


Class threedee.PolygonBuffer

A polygon buffer
Defined in: PolygonBuffer.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
addLight(light, transform)
Adds the specified light to the polygon buffer.
 
addModel(model, transform)
Adds the specified model to the polygon buffer.
 
applyPolygonColor(polygon, g)
Calculates the polygon color according to the material and the light sources and applies it to the specified graphics context.
 
Returns debugging info.
 
prepare(width, height)
Prepares the polygon buffer for the next use.
 
render(g)
Renders the polygon buffer.
 
setGlobalAmbient(globalAmbient)
Sets the global ambient color.
 
setRenderOptions(renderOptions)
Sets the render options.
Class Detail
threedee.PolygonBuffer()
Method Detail
addLight(light, transform)
Adds the specified light to the polygon buffer.
Parameters:
{!threedee.Light} light
The light to add
{!threedee.Matrix} transform
The transformation matrix to use

addModel(model, transform)
Adds the specified model to the polygon buffer.
Parameters:
{!threedee.RenderModel} model
The model to add
{!threedee.Matrix} transform
The transformation matrix to use

applyPolygonColor(polygon, g)
Calculates the polygon color according to the material and the light sources and applies it to the specified graphics context.
Parameters:
{!threedee.RenderPolygon} polygon
The polygon
{!CanvasRenderingContext2D} g
The graphics context

{string} getDebugInfo()
Returns debugging info. The debugInfo flag in the rendering options must be set to true to get up-to-date debug info.
Returns:
{string} The debug info

prepare(width, height)
Prepares the polygon buffer for the next use.
Parameters:
{number} width
The output width in pixels.
{number} height
The output height in pixels.

render(g)
Renders the polygon buffer.
Parameters:
{!CanvasRenderingContext2D} g
The graphics context

setGlobalAmbient(globalAmbient)
Sets the global ambient color.
Parameters:
{!threedee.Color} globalAmbient
The global ambient color to set

setRenderOptions(renderOptions)
Sets the render options.
Parameters:
{!threedee.RenderOptions} renderOptions
The render options to set.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 03 2012 16:18:57 GMT+0100 (CET)