We have a Models_Manager class in our project with map of IGameObjects
std::map<std::string, IGameObject*> gameModelList;
We add objects like this
Models::Sphere* sphere = new Models::Sphere();
sphere->SetProgram(Shader_Manager::GetShader("textureShader"));
sphere->Create();
gameModelList["fireball"] = sphere;
Later we would like to access the sphere again. To do that we would like to cast from IGameObject to Sphere. How? Thank you
inheritance:
class Sphere : public Models::Model
class Model :public IGameObject