- Timestamp:
- Jun 20, 2006, 2:11:11 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
r8597 r8600 212 212 213 213 if( data->animationState.interpolationFraction != 0.0 && 214 data->animationState.currentFrame != data->animationState.nextFrame) { 214 data->animationState.currentFrame != data->animationState.nextFrame) 215 { 215 216 //we need to interpolate 216 217 MD3Tag* nextFrameTag = data->boneFrames[data->animationState.nextFrame]->tags[child->parentTagIndex]; 217 this-> tmpMatrix[i] = this->interpolateTransformation(currFrameTag, nextFrameTag, data->animationState.interpolationFraction, i);218 this->interpolateTransformation(currFrameTag, nextFrameTag, data->animationState.interpolationFraction, i); 218 219 } 219 220 else … … 239 240 } 240 241 242 // PRINTF(0)("matrix: \n%f, %f, %f, %f\n%f, %f, %f, %f\n%f, %f, %f, %f\n%f, %f, %f, %f\n", 243 // this->tmpMatrix[i][0], 244 // this->tmpMatrix[i][1], 245 // this->tmpMatrix[i][2], 246 // this->tmpMatrix[i][3], 247 // this->tmpMatrix[i][4], 248 // this->tmpMatrix[i][5], 249 // this->tmpMatrix[i][6], 250 // this->tmpMatrix[i][7], 251 // this->tmpMatrix[i][8], 252 // this->tmpMatrix[i][9], 253 // this->tmpMatrix[i][10], 254 // this->tmpMatrix[i][11], 255 // this->tmpMatrix[i][12], 256 // this->tmpMatrix[i][13], 257 // this->tmpMatrix[i][14], 258 // this->tmpMatrix[i][15] 259 // ); 241 260 // switch to child coord system 242 261 … … 288 307 MD3Mesh* mesh = data->meshes[i]; 289 308 290 // gl.glBlendFunc(mesh.GLSrcBlendFunc, mesh.GLDstBlendFunc);291 // gl.glDepthMask(mesh.GLDepthMask);292 293 309 if( mesh->header->textureNum > 0 && &mesh->material[0] != NULL) 294 310 mesh->material[0].select(); … … 299 315 this->drawMesh(mesh, frame); 300 316 301 302 317 // draw vertex normals if needed 303 if( this->bDrawNormals) { 318 if( this->bDrawNormals) 319 { 304 320 // get vertex normals, interpolate if necessary 305 321 if( data->animationState.interpolationFraction != 0.0 && 306 data->animationState.currentFrame != data->animationState.nextFrame) { 322 data->animationState.currentFrame != data->animationState.nextFrame) 323 { 307 324 //interpolate vertex normals 308 325 this->drawVertexNormals(frame, this->tmpNormal[i]); 309 310 326 } 327 else { 311 328 //stick with current vertex normals 312 313 329 this->drawVertexNormals(frame, &mesh->normals[data->animationState.currentFrame]); 330 } 314 331 } 315 332 } … … 326 343 glPushMatrix(); 327 344 glMultMatrixf(this->tmpMatrix[i]); 328 329 345 // and draw child 330 346 this->draw(child); 331 332 347 glPopMatrix(); 348 333 349 i++; 334 350 it++; 335 351 } 352 336 353 } 337 354
Note: See TracChangeset
for help on using the changeset viewer.