Scene Graph Implementation
The simplest form of scene graph uses an array or linked list data structure, and displaying its shapes is simply a matter of linearly iterating the nodes one by one. Other common operations, such as checking to see which shape intersects the mouse pointer (e.g., in a GUI-based applications) are also done via linear searches. For small scene graphs, this tends to suffice.
Larger scene graphs cause linear operations to become noticeably slow and thus more complex underlying data structures are used, the most popular and common form being a tree. In these scene graphs, the composite design pattern is often employed to create the hierarchical representation of group nodes and leaf nodes.
Group nodes — Can have any number of child nodes attached to it. Group nodes include transformations and switch nodes.
Leaf nodes — Are nodes that are actually rendered or see the effect of an operation. These include objects, sprites, sounds, lights and anything that could be considered 'rendered' in some abstract sense.
Read more about this topic: Scene Graph
Famous quotes containing the words scene and/or graph:
“We [actors] are indeed a strange lot! There are times we doubt that we have any emotions we can honestly call our own. I have approached every dynamic scene change in my life the same way. When I married Charlie MacArthur, I sat down and wondered how I could play the best wife that ever was.... My love for him was the truest thing in my life; but it was still important that I love him with proper effect, that I act loving him with great style, that I achieve the ultimate in wifedom.”
—Helen Hayes (19001993)
“In this Journal, my pen is a delicate needle point, tracing out a graph of temperament so as to show its daily fluctuations: grave and gay, up and down, lamentation and revelry, self-love and self-disgust. You get here all my thoughts and opinions, always irresponsible and often contradictory or mutually exclusive, all my moods and vapours, all the varying reactions to environment of this jelly which is I.”
—W.N.P. Barbellion (18891919)