00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _OPENCITY_MODELLOADER_H_
00021 #define _OPENCITY_MODELLOADER_H_ 1
00022
00023 #include "main.h"
00024
00025 #include "ac3dobject.h"
00026 #include "ac3dmaterial.h"
00027
00028 #include <map>
00029 #include <vector>
00030
00031 using std::map;
00032 using std::vector;
00033
00034 using AC3D::Vertex;
00035
00036 class Model;
00037
00038
00039
00043 class ModelLoader {
00044 public:
00045
00046
00047
00051 static Model* const
00052 Load(
00053 const string & rcsFileName );
00054
00055
00056
00059 static Model* const
00060 LoadOCM(
00061 const string & rcsFileName );
00062
00063
00064
00067 static Model* const
00068 LoadAC3D(
00069 const string & rcsFileName );
00070
00071
00072
00075 static Vertex
00076 GetNormal(
00077 Vertex & vO,
00078 Vertex & vA,
00079 Vertex & vB );
00080
00081
00082 private:
00083 static void
00084 _AC3DTextureToGL(
00085 const string& strPath,
00086 const AC3D::AC3DObject* const pObject,
00087 map<string, GLuint>& mapTexture
00088 );
00089
00090
00091 static void
00092 _AC3DVertexToGL(
00093 const string& strPath,
00094 const vector<AC3D::AC3DMaterial>& vMaterial,
00095 const AC3D::AC3DObject* const pObject,
00096 const bool bProcessTranslucent = false
00097 );
00098 };
00099 #endif
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134