- Timestamp:
- 06/22/08 05:24:22 (16 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.h
r2782 r2795 1 #ifndef __ BinaryLoader_H__2 #define __ BinaryLoader_H__1 #ifndef __ResourceManager_H__ 2 #define __ResourceManager_H__ 3 3 4 // note use forward declaration instead 4 5 5 #include <string> 6 6 #include <iostream> … … 10 10 #include "common.h" 11 11 12 class igzstream; 13 12 14 13 15 namespace CHCDemoEngine 14 16 { 15 17 16 class igzstream;17 18 class SceneEntity; 18 19 class Material; 19 20 class Geometry; 20 21 class Texture; 22 class Matrix4x4; 21 23 22 23 class BinaryLoader 24 /** Loads a scene and also handles the cleanup 25 */ 26 class ResourceManager 24 27 { 25 28 public: 26 29 27 ~BinaryLoader(); 28 30 ~ResourceManager(); 31 /** Loads a model 32 */ 29 33 bool Load(const std::string &filename, SceneEntityContainer &geometry); 30 34 31 35 protected: 32 36 33 void LoadTextures( std::ifstream &str);34 void LoadShapes( std::ifstream &str);35 void LoadSceneEntities( std::ifstream &str, SceneEntityContainer &entities);37 void LoadTextures(igzstream &str); 38 void LoadShapes(igzstream &str); 39 void LoadSceneEntities(igzstream &str, SceneEntityContainer &entities); 36 40 37 SceneEntity *LoadSceneEntity( std::ifstream &str);38 Material *LoadMaterial( std::ifstream &str);39 Geometry *LoadGeometry( std::ifstream &str);41 SceneEntity *LoadSceneEntity(igzstream &str); 42 Material *LoadMaterial(igzstream &str); 43 Geometry *LoadGeometry(igzstream &str); 40 44 41 45 std::map<int, Texture *> mTextureTable; 42 46 std::map<int, Material *> mMaterialTable; 43 47 std::map<int, Geometry *> mGeometryTable; 48 49 // these are kept to be able to delete these resources afterwards 50 std::vector<Texture *> mTextures; 51 std::vector<Material *> mMaterials; 52 std::vector<Geometry *> mGeometry; 53 std::vector<SceneEntity *> mSceneEntities; 54 std::vector<Matrix4x4 *> mTrafos; 44 55 }; 45 56
Note: See TracChangeset
for help on using the changeset viewer.