Changeset 6207 in orxonox.OLD for branches/christmas_branche/src/lib/graphics/importer
- Timestamp:
- Dec 21, 2005, 2:31:24 AM (19 years ago)
- Location:
- branches/christmas_branche/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/lib/graphics/importer/md2Model.cc
r6205 r6207 33 33 #include "anormtab.h" 34 34 }; 35 36 //! again one of these strange id software parts37 static float *shadeDots = MD2Model::anormsDots[0];38 39 40 static sVec3D verticesList[MD2_MAX_VERTICES];41 35 42 36 … … 90 84 this->scaleFactor = this->data->scaleFactor; 91 85 86 shadeDots = MD2Model::anormsDots[0]; 92 87 /* set the animation stat mannualy */ 93 88 this->animationState.type = STAND; … … 111 106 /** 112 107 * initializes an array of vert with the current frame scaled vertices 113 * @param verticesList: the list of vertices to interpolate between108 * @param this->verticesList: the list of vertices to interpolate between 114 109 115 110 we won't use the pVertices array directly, since its much easier and we need 116 111 saving of data anyway 117 112 */ 118 void MD2Model::interpolate(/*sVec3D* verticesList*/)113 void MD2Model::interpolate(/*sVec3D* this->verticesList*/) 119 114 { 120 115 sVec3D* currVec; … … 126 121 for( int i = 0; i < this->data->numVertices; ++i) 127 122 { 128 verticesList[i][0] = currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0]);129 verticesList[i][1] = currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1]);130 verticesList[i][2] = currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2]);123 this->verticesList[i][0] = currVec[i][0] + this->animationState.interpolationState * (nextVec[i][0] - currVec[i][0]); 124 this->verticesList[i][1] = currVec[i][1] + this->animationState.interpolationState * (nextVec[i][1] - currVec[i][1]); 125 this->verticesList[i][2] = currVec[i][2] + this->animationState.interpolationState * (nextVec[i][2] - currVec[i][2]); 131 126 } 132 127 } … … 172 167 this->animate(time); 173 168 this->processLighting(); 174 this->interpolate(/* verticesList*/);169 this->interpolate(/*this->verticesList*/); 175 170 } 176 171 … … 185 180 glPushMatrix(); 186 181 this->renderFrame(); 187 //renderFrameTriangles();182 // renderFrameTriangles(); 188 183 glPopMatrix(); 189 184 } … … 222 217 glTexCoord2f( ((float *)pCommands)[0], ((float *)pCommands)[1] ); 223 218 glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]); 224 glVertex3fv( verticesList[pCommands[2]]);219 glVertex3fv(this->verticesList[pCommands[2]]); 225 220 } 226 221 glEnd(); … … 234 229 void MD2Model::renderFrameTriangles() const 235 230 { 236 //static sVec3D verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */231 //static sVec3D this->verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */ 237 232 int* pCommands = this->data->pGLCommands; 238 233 /* some face culling stuff */ … … 243 238 // 244 239 // this->processLighting(); 245 // this->interpolate(/* verticesList*/);240 // this->interpolate(/*this->verticesList*/); 246 241 this->data->material->select(); 247 242 -
branches/christmas_branche/src/lib/graphics/importer/md2Model.h
r6199 r6207 241 241 static float anormsDots[SHADEDOT_QUANT][256]; //!< the anormals dot products 242 242 static sAnim animationList[21]; //!< the anomation list 243 //! again one of these strange id software parts 244 float* shadeDots; 243 245 244 246 MD2Data* data; //!< the md2 data pointer … … 247 249 float scaleFactor; //!< the scale factor (individual) 248 250 sAnimState animationState; //!< animation state of the model 251 sVec3D verticesList[MD2_MAX_VERTICES]; //!< place to temp sav the vert 249 252 }; 250 253
Note: See TracChangeset
for help on using the changeset viewer.