Class Index | File Index

Classes


Class JSC3D.Scene

Scene This class implements scene that contains a group of meshes that forms the world.
Defined in: jsc3d.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
JSC3D.Scene(name)
Field Summary
Field Attributes Field Name and Description
 
The Axis-aligned bounding box of the whole scene.
 
Name of the scene.
 
Source URL of the scene, empty if none.
Method Summary
Method Attributes Method Name and Description
 
addChild(mesh)
Add a mesh to the scene.
 
forEachChild(operator)
Traverse meshes in the scene, calling a given function on each of them.
 
Get all meshes in the scene.
 
init()
Initialize the scene.
 
See if the scene is empty.
 
Remove a mesh from the scene.
Class Detail
JSC3D.Scene(name)
Parameters:
name
Field Detail
aabb
The Axis-aligned bounding box of the whole scene. Read only.

name
Name of the scene.

srcUrl
Source URL of the scene, empty if none. Read only.
Method Detail
addChild(mesh)
Add a mesh to the scene.
Parameters:
{JSC3D.Mesh} mesh
the mesh to be added.

forEachChild(operator)
Traverse meshes in the scene, calling a given function on each of them.
Parameters:
{Function} operator
a function that will be called on each mesh.

{Array} getChildren()
Get all meshes in the scene.
Returns:
{Array} meshes as an array.

init()
Initialize the scene.

{Boolean} isEmpty()
See if the scene is empty.
Returns:
{Boolean} true if it does not contain meshes; false if it has any.

removeChild(mesh)
Remove a mesh from the scene.
Parameters:
{JSC3D.Mesh} mesh
the mesh to be removed.

Documentation generated by JsDoc Toolkit 2.1.0 on Thu Nov 20 2014 00:20:57 GMT+0800 (CST)