Class Index | File Index

## Classes

- _global_
- JSC3D
- JSC3D.AABB
- JSC3D.BinaryStream
- JSC3D.LoaderSelector
- JSC3D.Material
- JSC3D.Math3D
- JSC3D.Matrix3x4
- JSC3D.Mesh
- JSC3D.ObjLoader
- JSC3D.PickInfo
- JSC3D.Scene
- JSC3D.StlLoader
- JSC3D.Texture
- JSC3D.Viewer

# 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)

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.
| getChildren() Get all meshes in the scene.
| init() Initialize the scene.
| isEmpty() See if the scene is empty.
| removeChild(mesh) Remove a mesh from the scene.

Class Detail
JSC3D.Scene(name)

Parameters:
name

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 28 2013 14:35:14 GMT+0800 (CST)