TileScene Class Reference
Inherits from | CC3Scene : CC3Node : CC3Identifiable : NSObject |
Declared in | TileScene.h |
Overview
A CC3Scene that is specialized to display only a single main node, and is optimized so that many TileScenes can be displayed on the screen simultaneouly.
Each tile scene contains its own camera and lamp, so that different perspectives and lighting conditions can be applied to each TileScene. The main node of each scene is selected at random from a collection of node templates, and the position of the light is selected at random for each scene, so that each scene instance appears a little different than other instances.
To simplify using this scene with different main objects, the camera automatically focuses on and frames the main object when the scene first opens up.
Each TileScene supports touch events. The main node can be rotated by dragging a finger across the tile. In addition, when the finger is lifted, if it is touching the main node when released, the main node will briefly glow. This demonstrates the ability to select nodes from touches across multiple 3D scenes.
In addition, some nodes should be colored and others not. This is enabled by adding a new property to CC3Node through an extention category. This extension property makes use of the userData property available to all subclasses of CC3Identifiable. This demonstrates the use of the userData property to avoid having to create customized subclasses of CC3Node to add state data to 3D components.