I was wondering if I shouldn't start using multiple inheritance for my classes, but I don't have any experience with it. Imagine something like this:
struct StaticObject : public PhysicalObject;
struct DynamicObject : public PhysicalObject;
struct Particle : public GraphicalObject;
struct Box : public GraphicalObject, public DynamicObject;
void render (GraphicalObject* obj);
void applyImpulse (DynamiclObject* obj);
void setCollisionFilter (PhysicalObject* obj);
Of course, I can pass a particle to render, but can I pass a box to any of the functions just like that?
And what if I want to store pointers? Like this:
Can I simply put box objects there?...
Edited by Max Power, Today, 04:59 AM.