Original Post
Wondering how others might have done this, or something similar. I'm also very interested in how you might relate game objects to nodes in a scene graph. I created an IRenderable interface because I want to be able to have lots of different representations of objects (ie. mesh, billboard, primitive, whatever). Cool, now I have IObject, a concrete Object, and RenderableObject. Then, somewhere I ended up with something like:
for each visible IObject in scene
object->render() // ahh render is not a member of IObject
So then I made IRenderable a member of IObject and did something like this:
for each visible IObject in scene
IRenderable r = object.Renderable();
if(r) r->Render();
And then...
IRenderable::Render()
{
SetTransform(WorldTransform()) // Ahhh WorldTransform is not a method of IRenderable
}
I mean, each of those situations has possible solutions but they always smelled bad to me and I ended up abandoning the approaches. There were other problems too but those particular cases came to mind for this post.