Hi. At the moment I'm planning and writing some quad tree and quad tree nodes for rendering a terrain scene. I want to reuse these classes for many types of scenes, so I can have different terrain features rendered in each scene e.g
in one and possibly
in another. As such I thought an abstract type of quadtree and quadtree node would be good (the example I'm basing my code on has the same render func passed through the chain). However when building the quadtree I need to call new QuadTreeNode(), the problem being that QuadTreeNode is an ADT, and as such cannot be instantiated. So....I thought of using pointers to a custom render function built for each scene.
Is this a crazy idea? Are there other alternatives?