From 5205d99629a9b15865e7a1950b49d8da40a91309 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 3 Jul 2011 15:33:54 +0200 Subject: Load and save terrain objects, added ModelManager for object models. --- model.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'model.h') diff --git a/model.h b/model.h index 7659d9c..dda3228 100644 --- a/model.h +++ b/model.h @@ -5,6 +5,7 @@ #include #include +#include #include #include @@ -28,6 +29,8 @@ class Mesh { class Model { public: + typedef boost::shared_ptr 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 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 -- cgit v1.2.3