Rev | Line | |
---|
[1024] | 1 | #include <string>
|
---|
| 2 | #include <vector>
|
---|
| 3 | #include <map>
|
---|
| 4 | #include <fltk/dirent.h>
|
---|
| 5 | #include <iostream>
|
---|
| 6 | #include <fstream>
|
---|
| 7 |
|
---|
| 8 | using namespace std;
|
---|
| 9 |
|
---|
| 10 | class GeoMaterialLoader
|
---|
| 11 | {
|
---|
| 12 | private:
|
---|
| 13 |
|
---|
| 14 | // Directory path.
|
---|
| 15 | string mMatPath;
|
---|
| 16 | string mTexPath;
|
---|
| 17 |
|
---|
| 18 | // List of files.
|
---|
| 19 | vector<string> mFiles;
|
---|
| 20 |
|
---|
| 21 | // Mat of materials and textures.
|
---|
| 22 | map<string,string> mMatMap;
|
---|
| 23 |
|
---|
| 24 | // Load material.
|
---|
| 25 | void load();
|
---|
| 26 |
|
---|
| 27 | // Search material files.
|
---|
| 28 | void search(string path);
|
---|
| 29 |
|
---|
| 30 | public:
|
---|
| 31 |
|
---|
| 32 | /// Constructor.
|
---|
| 33 | GeoMaterialLoader();
|
---|
| 34 |
|
---|
| 35 | /// Destroyer.
|
---|
| 36 | ~GeoMaterialLoader();
|
---|
| 37 |
|
---|
| 38 | // Check if material name exists.
|
---|
| 39 | bool existsMaterial(string matName);
|
---|
| 40 |
|
---|
| 41 | // Gets texture filename of the material.
|
---|
| 42 | string getTextureFileName(string matName);
|
---|
| 43 | };
|
---|
Note: See
TracBrowser
for help on using the repository browser.