Hello,
I am working on an Octree System. I want to know what an octree node needs to have. Thats what i am thinking but i don't know if this will work. So please help me with it:
//These two are for scene graphs and octrees together
class SceneNode {
public:
list<SceneNode *> children;
};
class Object : public SceneNode {
//something inside
};
class OctreeNode : public SceneNode {
public:
BoundingBox box;
};
class Octree {
public:
OctreeNode * root;
};
And about scene graph an octree together. How to implement it ? Like how i did it above: octrees are parents of octrees and objects too:
octree->addChild(oct1,oct2);
octree->addChild(obj1);
oct1->addChild(obj2);
oct2->addChild(oct3);
oct2->addChild(obj4);
//etc...
Thanks,
Kasya