Trees

A tree is a hierarchical representation of data.


A, B, C, D, E, F are nodes of the tree

A is the parent of B & C
D, E, F are children of B

A & B are internal nodes
C, D, E, F are leaf nodes

A is the root node






Trees

is a subtree of






Traversing a Tree

Traversing a tree == visiting all nodes recursively

"Visiting" a node == performing some function on the node & its data

traverse(node):
   visit(node)
   for each child of node
      traverse(child)
visit(A)
visit(B)
visit(D)
visit(E)
visit(F)
visit(C)





Scene Graphs

A scene graph is a tree used to represent a graphical scene.

Node data typically consists of groupings, transformations, lights, or geometry.






Scene Graphs

Transformations normally act hierarchically - they affect all their child nodes, and accumulate down the tree.






Scene Graph Libraries

OpenGL Performer

Others






Scene Graph Libraries

Common features:

An old introduction to Performer

Creative Commons License
This document is by Dave Pape, and is released under a Creative Commons BY-2.0 License.