Changeset 4461 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- Jun 2, 2005, 12:32:34 AM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/md2Model.cc
r4460 r4461 75 75 ********************************************************************************/ 76 76 77 /* 77 /** 78 78 \brief simple constructor initializing all variables 79 79 */ … … 87 87 } 88 88 89 /* 89 /** 90 90 \brief simple destructor, dereferencing all variables 91 91 … … 122 122 123 123 124 /* 124 /** 125 125 \brief sets the animation type 126 126 \param type: animation type … … 146 146 147 147 148 /* 148 /** 149 149 \brief sets the time in seconds passed since the last tick 150 150 \param time: in sec … … 156 156 157 157 158 /* 158 /** 159 159 \brief draws the model: interface for all other classes out in the world 160 160 */ … … 172 172 173 173 174 /* 174 /** 175 175 \brief this is an internal function to render this special frame selected by animate() 176 176 */ … … 216 216 217 217 218 /* 218 /** 219 219 \brief animates the current model 220 220 … … 243 243 244 244 245 /* 245 /** 246 246 \brief this is how id is precessing their lightning 247 247 … … 253 253 } 254 254 255 /* 255 256 /** 256 257 \brief prints out debug informations 257 258 */ … … 273 274 ********************************************************************************/ 274 275 275 /* 276 /** 276 277 \brief simple constructor 277 278 */ … … 293 294 294 295 295 /* 296 /** 296 297 \brief simple destructor 297 298 … … 312 313 313 314 314 /* 315 /** 315 316 \brief this will load the whole model data (vertices, opengl command list, ...) 316 \param fileName tothe model file317 \param fileName: the name of the model file 317 318 \return true if success 318 319 */ … … 382 383 383 384 384 /* 385 /** 385 386 \brief loads the skin/material stuff 386 \param fileName of the skin file387 \param fileName: name of the skin file 387 388 \return true if success 388 389 */ -
orxonox/trunk/src/lib/graphics/importer/md2Model.h
r4459 r4461 34 34 #define MD2_MAX_FRAMESIZE (MD2_MAX_VERTICES * 4 + 128) //!< maximal framesize 35 35 36 #define NUM_VERTEX_NORMALS 162 //!< 37 #define SHADEDOT_QUANT 16 36 #define NUM_VERTEX_NORMALS 162 //!< number of vertex normals 37 #define SHADEDOT_QUANT 16 //!< shade dot quantity - no idea what it is 38 38 39 39 //! This stores the speed of the animation between each key frame - currently conflicting with the animation framework 40 #define kAnimationSpeed 12.0f 40 #define kAnimationSpeed 12.0f //!< animation speed 41 41 42 42 //! This holds the header information that is read in at the beginning of the file: id software definition … … 113 113 114 114 public: 115 int numFrames;116 int numVertices;117 int numTriangles;118 int numGLCommands;119 char* fileName;120 char* skinFileName;121 MD2Header* header;115 int numFrames; //!< number of frames 116 int numVertices; //!< number of vertices 117 int numTriangles; //!< number of triangles 118 int numGLCommands; //!< number of gl commands in the glList (tells how to draw) 119 char* fileName; //!< file name of the model File 120 char* skinFileName; //!< file name of the skin file 121 MD2Header* header; //!< the header file 122 122 123 sVec3D* pVertices; 124 int* pGLCommands; 125 int* pLightNormals; 126 glCommandVertex* pGLCommands2; 123 sVec3D* pVertices; //!< pointer to the vertices data block 124 int* pGLCommands; //!< pointer to the gllist data block 125 int* pLightNormals; //!< pointer to the light normals 127 126 128 Material* material;129 float scaleFactor;127 Material* material; //!< pointer to the material 128 float scaleFactor; //!< the scale factor of the model, (global) 130 129 }; 131 130 … … 138 137 virtual ~MD2Model(); 139 138 140 void drawFrame(int frame);141 139 void draw(); 142 void draw2();143 140 144 141 void setAnim(int type); 142 /** 143 \brief scales the current model 144 \param scaleFactor: the factor [0..1] to use for scaling 145 */ 145 146 void scaleModel(float scaleFactor) { this->scaleFactor = scaleFactor;} 146 147 … … 157 158 public: 158 159 /* these variables are static, because they are all the same for every model */ 159 static sVec3D anorms[NUM_VERTEX_NORMALS];160 static float anormsDots[SHADEDOT_QUANT][256];161 static sAnim animationList[21];160 static sVec3D anorms[NUM_VERTEX_NORMALS]; //!< the anormals 161 static float anormsDots[SHADEDOT_QUANT][256]; //!< the anormals dot products 162 static sAnim animationList[21]; //!< the anomation list 162 163 163 164 private: 164 MD2Data* data;165 MD2Data* data; //!< the md2 data pointer 165 166 166 float scaleFactor;167 sAnimState animationState;167 float scaleFactor; //!< the scale factor (individual) 168 sAnimState animationState; //!< animation state of the model 168 169 }; 169 170
Note: See TracChangeset
for help on using the changeset viewer.