Skip to content
Alessandro Febretti edited this page Dec 23, 2014 · 6 revisions

Last revision: ver. 6.0- 23 December 2014

module cyclops

Implements a scene layer. Layers are used to organize groups of objects together, regardless of their position in the scene hyerarchy. Layers can be enabled and disabled to add/remove multiple objects from the scene. Objects in a disabled layer are explicitly removed from the scene traversal graph. Making layer disabling more efficient that setting object visibility when lots of objects need to be hidden.

SceneSayer derived classes are used to set various visual properties of contained objects (like lighting and compositing effects).

Methods

Method(s) Description
addLayer(SceneLayer child) Adds a layer as a child of this scene layer.
removeLayer(SceneLayer child) Removed a child of this layer.
setCamera(Camera cam), Camera getCamera() Sets or gets the Camera that will draw this layer. If no camera is specified all cameras will draw this layer.
(v6.0) setId(uint id), uint getId() Gets or sets the layer Id. Layer ids are an alternative system to Layer.setCamera for layers that need to be enabled for multiple cameras.

Constants

Constant Description
CameraDrawExplicitLayers Use this flag on cameras that should only draw layers explicitly attached to them. Flag bit: 17
v6.0 Layer Ids Layer Ids, to use with Layer.setId and Camera.setFlag to associate cameras to layers. Alternative system to Layer.setCamera for layers that need to be enabled for multiple cameras.
Layer1 Flag bit: 16
Layer2 Flag bit: 15
Layer3 Flag bit: 14
Layer4 Flag bit: 13
Layer5 Flag bit: 12
Layer6 Flag bit: 11
Layer7 Flag bit: 10
Layer8 Flag bit: 9
Clone this wiki locally