diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-07-03 15:33:54 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-07-03 15:33:54 +0200 |
commit | 5205d99629a9b15865e7a1950b49d8da40a91309 (patch) | |
tree | 91b3deb782dac4432d48935b0566805123951d92 /model.h | |
parent | 75a90df8bf7f38e746e021c23248e1607931132c (diff) |
Diffstat (limited to 'model.h')
-rw-r--r-- | model.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -5,6 +5,7 @@ #include <assimp/assimp.hpp> #include <assimp/aiScene.h> +#include <boost/shared_ptr.hpp> #include <map> #include <string> @@ -28,6 +29,8 @@ class Mesh { class Model { public: + typedef boost::shared_ptr<Model> p; + virtual ~Model() {}; virtual void render() = 0; @@ -45,6 +48,18 @@ class Tree : public Model { virtual void render(); }; +class ModelManager { + private: + static ModelManager *model_mgr; + std::map<const std::string, Model::p> models; + + public: + void add_model(const std::string name, Model::p model); + Model::p get_model(const std::string name); + + static ModelManager& get_instance(); +}; + } #endif |