Hmmm... never thought of looking at Irrlicht's code
I'll have to take a look at it...
Anyway. I am currently attempting to implement an Octree for the geometry...
In my class cOctreeNode, i have a static function BuildOctree that traverses through my loaded world, and builds a bounding box around the world, storing all that info into a scene node called 'root'.
It then shall check if 'root' contains more that N triangles, and if it does, it calls root's member function subdivide, which generates 8 more scene nodes, storing pointers to them in root's children array...
And so it continues, until each node has less than X triangles.
Okay, i know, this implementation sucks, but it's the best i could think of on my own... BTW, all the scene nodes are linked view pointers to their parent, and to 8 children nodes...
![Shocked :shock:](./images/smilies/icon_eek.gif)
Did I just write that?
![Shocked :shock:](./images/smilies/icon_eek.gif)