venerdì, agosto 18, 2006

Hierarchical system


I've planned a hierarchical system to use in the node hierarchy.
The scene graph is organized by an n-tree.
Each node can have n childrens with n as a variable value.

you can choiche if each children of a node can be world transformed by the father or not!

This allow the programmer to use the node hierarchy as he wishes.
If you need to put a weapon on a camera to create an FPS style view, you can add to the camera children list the weapon node pointer and enable the world transformation, so when you move the camera you also move the weapon.
but if you want to build a BSP tree scene graph, you need to store the nodes as a tree but you don't need to transform the coordinates of each node refering to the parent world transformation.
So if you want to do that you can disable for the nodes in the tree the flag of the hierarchical transformation.

I think this is very flexible!