Skip to content
davido262 edited this page Nov 11, 2012 · 3 revisions

Description of the Scene manager.

This describes the whole scene. It contains Entitys, each with Components attached. A scene can be saved into an XML file, or loaded from one. Saving an XML scene means to save all the current states of all the Entitys and Components in the scene. Loading an XML scene destroys the current scene and then creates a new one.

When creating a Scene a ComponentFactory must be specified. The ComponentFactory is the one in charge of creating a new Component of the corresponding type when reading the XML file. A ComponentFactory is an abstract class. The DefaultComponentFactory can be used; it is able to create RenderableMesh, RigidBody, Light and Camera. If new Component types are added, then a new ComponentFactory must be created which is able to recognize the new Component from the XML scene.

Initialization

It does nothing, it exists only for standardization purposes. All the Entitys and Components are created by loading an XML scene.

Shutdown

It only removes all children from the root node. This is a recursive process so all Entitys in the scene get deleted. Whenever an Entity is deleted it deletes all its Components which get unregistered from their respective managers at destruction.

Clone this wiki locally