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
is a subtree of
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) |
A scene graph is a tree used to represent a graphical scene.
Node data typically consists of groupings, transformations, lights, or geometry.
Transformations normally act hierarchically - they affect all their child nodes, and accumulate down the tree.
Common features:
An old introduction to Performer