Document Object

Properties
none


Constructor

none


Methods

Object activeCamera()
Returns the active camera.


Number animationEnd()
Returns the time point where the animation ends.


Material addMaterial(String type, String name)
Adds a new material to the scene. The type can be every available shader type like Material, Marble, Wood, etc. You also have to pass in an initial name of the material which can be changed later.


Object addObject( Number type)
Adds a object of the scene. The parameter type must be any of the various object type constants.


Number editMode()
Return the current edit mode (POINT_MODE, EDGE_MODE, POLY_MODE or OBJECT_MODE)


Material materialAtIndex(Number index)
Return the material at index.


Number materialCount()
Return the number of materials in the scene.


void releaseRedrawLock()
Releases the redraw lock. Only use this function if you called retainRedrawLock() before. Otherwise the UI of Cheetah3D will stay locked.


void render()
void render(String filename)
Renders the current scene. If a filename is also passed to this function the rendered image will be saved to that file.


Object root()
Returns the root object of the scene graph.


void redrawAll()
Redraws the hole UI.


void retainRedrawLock()
Many Javascript functions cause a redraw of the UI. To avoid wasting time by unnecessary UI redraws you can lock the automatic UI redraw. But don't forget to call releaseRedrawLock() at the end of the script. Otherwise the UI will stay locked.


void saveToFile( String filename, String type)
Saves the scene to the filename.


Object selectedObject()
Returns the selected object.


void setAnimPosition(Number time)
Sets the animation position to time.
© 2001-2004 Martin Wengenmayer. All rights reserved.