Changeset 4276 in orxonox.OLD for orxonox/trunk/src/lib/graphics/importer/md2Model.h
- Timestamp:
- May 24, 2005, 11:08:33 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/md2Model.h
r4245 r4276 140 140 141 141 142 143 /* forward definitions */ 144 class Material; 145 146 147 148 142 149 //! This is a MD2 Model class 143 150 class MD2Model : public AbstractModel { … … 146 153 MD2Model(); 147 154 virtual ~MD2Model(); 148 149 bool loadModel(const char* filename);150 bool loadSkin(const char* filename);151 152 void drawModel(float time);153 void drawFrame(int frame);154 void draw();155 156 void setAnim(int type);157 void scaleModel(float s);158 159 void tick(float dtS);160 161 void animate(/*float time*/);162 private:163 void processLightning();164 void interpolate(CVector3* vertlist);165 void renderFrame();166 float getCurrentTime(t3DModel *pModel, int nextFrame);167 168 t3DModel* model;169 float localTime;170 };171 172 /* forward definitions */173 class Material;174 175 176 //! A class that handles all of the loading code177 class MD2Loader : public BaseObject {178 179 public:180 MD2Loader();181 virtual ~MD2Loader();182 183 bool importMD2(t3DModel *pModel, char *fileName, char *texture = NULL);184 185 private:186 void readMD2Data();187 void parseAnimations(t3DModel *pModel);188 void convertDataStructures(t3DModel *pModel);189 void computeNormals(t3DModel *pModel);190 void cleanUp();191 192 FILE *pFile;193 tMd2Header header; //!< The header data194 tMd2Skin *pSkins; //!< The skin data195 tMd2TexCoord *pTexCoords; //!< The texture coordinates196 tMd2Face *pTriangles; //!< Face index information197 tMd2Frame *pFrames; //!< The frames of animation (vertices)198 };199 200 201 //! This is a MD2 Model class202 class MD2Model2 : public AbstractModel {203 204 public:205 MD2Model2();206 virtual ~MD2Model2();207 155 208 156 bool loadModel(const char* filename); … … 238 186 int numGLCommands; 239 187 char* fileName; 188 char* skinFileName; 240 189 tMd2Header* header; 241 190
Note: See TracChangeset
for help on using the changeset viewer.