Okay, I'l try my best to describe the problem more precisely. Before I go into further details, this is an implementation of a scene graph holding a quad tree, something used in graphics programming in order to arrange elements in space to avoid sending unnecesary data to the graphics card. First of all there's CScene, which represents the scene graph. CScene holds a tree of nodes and functionality for inserting in that tree and manipulating it. Since this tree can hold a lot of diffrent types of nodes, I need to just define a very loose interface for the minimum required functionality of a node that needs to be implemented ( such as Update, Render, AddChild etc ). That interface is called CNodeInterface. When CScene is created it will create the upper elements of the tree with CQuads, this is to create the quad tree. This is how it could look for example:
ROOT
|
|---Quad 1
| |
| |---Quad 1.1
| |
| |---Player
| |
| |---Sword
|
|---Quad 2
|---Quad 3
|---Quad 4
|
In order to save space I've left out nodes under Quad 2, 3 and 4 as well as 3 sub quads under Quad 1. Player and Sword implements CNodeInterface. Thankful for any help :)