Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8600 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 20, 2006, 2:11:11 AM (18 years ago)
Author:
patrick
Message:

bsp: md3 tag rotation and submodel drawing issue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc

    r8597 r8600  
    212212
    213213      if( data->animationState.interpolationFraction != 0.0 &&
    214           data->animationState.currentFrame != data->animationState.nextFrame) {
     214          data->animationState.currentFrame != data->animationState.nextFrame)
     215      {
    215216        //we need to interpolate
    216217        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);
    218219      }
    219220      else
     
    239240      }
    240241
     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//                );
    241260      // switch to child coord system
    242261
     
    288307      MD3Mesh* mesh = data->meshes[i];
    289308
    290 //       gl.glBlendFunc(mesh.GLSrcBlendFunc, mesh.GLDstBlendFunc);
    291 //       gl.glDepthMask(mesh.GLDepthMask);
    292 
    293309      if( mesh->header->textureNum > 0 && &mesh->material[0] != NULL)
    294310        mesh->material[0].select();
     
    299315      this->drawMesh(mesh, frame);
    300316
    301 
    302317      // draw vertex normals if needed
    303       if( this->bDrawNormals) {
     318      if( this->bDrawNormals)
     319      {
    304320        // get vertex normals, interpolate if necessary
    305321        if( data->animationState.interpolationFraction != 0.0 &&
    306             data->animationState.currentFrame != data->animationState.nextFrame) {
     322            data->animationState.currentFrame != data->animationState.nextFrame)
     323        {
    307324          //interpolate vertex normals
    308325          this->drawVertexNormals(frame, this->tmpNormal[i]);
    309             }
    310             else {
     326        }
     327        else {
    311328          //stick with current vertex normals
    312               this->drawVertexNormals(frame, &mesh->normals[data->animationState.currentFrame]);
    313             }
     329          this->drawVertexNormals(frame, &mesh->normals[data->animationState.currentFrame]);
     330        }
    314331      }
    315332    }
     
    326343      glPushMatrix();
    327344      glMultMatrixf(this->tmpMatrix[i]);
    328 
    329345      // and draw child
    330346      this->draw(child);
    331 
    332347      glPopMatrix();
     348
    333349      i++;
    334350      it++;
    335351    }
     352
    336353  }
    337354
Note: See TracChangeset for help on using the changeset viewer.