Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6188 in orxonox.OLD for branches


Ignore:
Timestamp:
Dec 20, 2005, 2:22:32 PM (19 years ago)
Author:
patrick
Message:

christmas: got the md2 bug. the devil is in the detail

Location:
branches/christmas_branche/src/lib/graphics/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/christmas_branche/src/lib/graphics/importer/md2Model.cc

    r6184 r6188  
    181181{
    182182  glPushMatrix();
    183   //this->renderFrame();
    184   renderFrameTriangles();
     183  this->renderFrame();
     184//   renderFrameTriangles();
    185185  glPopMatrix();
    186186}
     
    352352  this->numTexCoor = 0;
    353353
    354   this->scaleFactor = 0.2f;
     354  this->scaleFactor = 1.0f;
     355//   this->scaleFactor = 0.2f;
    355356
    356357  this->fileName = NULL;
     
    455456        {
    456457          /* SPEEDUP: *(pVerts + i + 0) = (*(frame->pVertices + i + 0)...  */
    457           pVertex[j][0] = ((frame->pVertices[j].v[0] * frame->scale[0] ) + frame->translate[0] )* this->scaleFactor;
    458           pVertex[j][1] = ((frame->pVertices[j].v[2] * frame->scale[2]) + frame->translate[2]) * this->scaleFactor;
    459           pVertex[j][2] = (-1.0 * (frame->pVertices[j].v[1] * frame->scale[1] + frame->translate[1])) * this->scaleFactor;
     458           pVertex[j][0] = ((frame->pVertices[j].v[0] * frame->scale[0] ) + frame->translate[0] )* this->scaleFactor;
     459           pVertex[j][1] = ((frame->pVertices[j].v[2] * frame->scale[2]) + frame->translate[2]) * this->scaleFactor;
     460           pVertex[j][2] = (-1.0 * (frame->pVertices[j].v[1] * frame->scale[1] + frame->translate[1])) * this->scaleFactor;
     461
     462//            pVertex[j][0] = ((frame->pVertices[j].v[0] /** frame->scale[0]*/ )/* + frame->translate[0]*/ );
     463//            pVertex[j][2] = (-1.0f * (frame->pVertices[j].v[2] /** frame->scale[2]*/) /*+ frame->translate[2]*/);
     464//            pVertex[j][1] = ((frame->pVertices[j].v[1] /** frame->scale[1]*/ /*+ frame->translate[1]*/));
     465
    460466
    461467          printf("vertex %i/%i: (%f, %f, %f)\n", j, this->numVertices, pVertex[j][0], pVertex[j][1], pVertex[j][2]);
  • branches/christmas_branche/src/lib/graphics/importer/md2Model.h

    r6181 r6188  
    6969typedef struct
    7070{
    71   char             v[3];                 //!< the vector of the vertex
     71  unsigned char             v[3];                 //!< the vector of the vertex
    7272  unsigned char    lightNormalIndex;     //!< the index of the light normal
    7373} sVertex;
Note: See TracChangeset for help on using the changeset viewer.