]> git.mxchange.org Git - flightgear.git/blob - src/Model/loader.hxx
Make sure that all elapsed time gets passed to update when a subsystem
[flightgear.git] / src / Model / loader.hxx
1 #ifndef __MODEL_LOADER_HXX
2 #define __MODEL_LOADER_HXX 1
3
4 #ifndef __cplusplus
5 # error This library requires C++
6 #endif
7
8 #include <simgear/compiler.h>   // for SG_USING_STD
9
10 #include <map>
11 SG_USING_STD(map);
12
13 #include <string>
14 SG_USING_STD(string);
15
16 #include <plib/ssg.h>
17
18
19 /**
20  * Base class for loading and managing SSG things.
21  */
22 class FGSSGLoader
23 {
24 public:
25     FGSSGLoader ();
26     virtual ~FGSSGLoader ();
27     virtual void flush ();
28 protected:
29     std::map<string,ssgBase *> _table;
30 };
31
32
33 /**
34  * Class for loading and managing models with XML wrappers.
35  */
36 class FGModelLoader : public FGSSGLoader
37 {
38 public:
39     FGModelLoader ();
40     virtual ~FGModelLoader ();
41
42     virtual ssgEntity * load_model (const string &path);
43 };
44
45
46 /**
47  * Class for loading and managing textures.
48  */
49 class FGTextureLoader : public FGSSGLoader
50 {
51 public:
52     FGTextureLoader ();
53     virtual ~FGTextureLoader ();
54
55     virtual ssgTexture * load_texture (const string &path);
56 };
57
58 #endif