Game entities can be: cameras, lights, actors, model instances, vehicles, helicopters, planes, etc.
Game object components can be: springs, wind sources, models, physical objects – good candidates for external libraries resources.
This is how you can create a helicopter:
Extend from model instance and attach a wind source to the helicopter.
This is how you can create a player:
Extend from model instance and attach a camera to it. When you move the player in the game state, the camera follows its path.
This is basically the difference between component and entity.
The component is just an wrapper for the resource you have externally and an entity is the container – is what gets mapped to the component; the ID.
Of course, I can pass a particle to render, but can I pass a box to any of the functions just like that?
A box – not really the shape of the box, but instead a class that can instantiate the box shape – knows how to apply impulse on itself. You just need to call:
PhysicalObject::AddForce( const Vector3& _vForce );
And what if I want to store pointers? Like this:
vector v;
Can I simply put box objects there?...
*>
Not really the shape of the box, but instead a class that can instantiate the box shape. Why load multiple boxes shape data when you can load once and share that?!
I'd do like that:
CBox inherits from CShape;
CPhysicalObject inherits from CShapeInstance;
CShapeInstance has a pointer to CShape and a matrix that defines where to be rendered – doesn't mean it can render itself;
Then you have std::vector <CPhysicalObject*> in the physics world.