Game Development Reference
In-Depth Information
Root
(Active)
Node
(Inactive)
Node
(Active)
Node
(Active)
Inactive
Subgraph
Node
(Active)
Node
(Active)
Node
(Active)
Node
(Active)
Figure 1.5. Deactivation being propagated from the root node of a subgraph.
1.3.4 Subgraph State
Nodes within the scene graph can be in one of several states that impact all the
child nodes in the subgraph rooted at that node (Figure 1.5):
Active. When a node is active it means that all interested aspects are able
to process it and update any data or internal resources associated with it.
Inactive. Subgraphs can be deactivated at any time. Once inactive the
nodes should be treated by the aspects as if they don't exist but can retain
any resources. Subgraphs are appended to the scene in an inactive state to
allow aspects to initialize any associated resources before updating begins.
Pending deletion. All nodes within the subgraph are inactive and will shortly
be deleted. Aspects should prepare for this by cleaning up any associated
resources.
As with all node attributes, the exact definition of subgraph states can be defined
by the users of the engine. However, additional care should be taken due to the
wide impact of such states and how various aspects might interpret them.
1.3.5 Event Queue
The scene graph and its constituent nodes describe the current structure and
state of the simulation. This simulation, however, will not remain static. It will
be characterized by changes to the structure of the scene and the contents of the
nodes as the logic of the simulation is played out.
 
Search Nedrilad ::




Custom Search