Scene Graph - Scene Graph Implementation

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:

    The scene of suffering is a scene of joy when the suffering is past; and the silent reminiscence of hardships departed, is sweeter than the presence of delight.
    Herman Melville (1819–1891)

    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 (1889–1919)