Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4225 in orxonox.OLD for orxonox/branches/md2_loader/src/lib


Ignore:
Timestamp:
May 19, 2005, 10:21:09 PM (19 years ago)
Author:
patrick
Message:

orxonox/branches/md2_loader: fixed a problem in the loading process

File:
1 edited

Legend:

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

    r4224 r4225  
    300300          pVertices[j].vertex[2] = -1 * (pFrame->aliasVertices[j].vertex[1] * pFrame->scale[1] + pFrame->translate[1]);
    301301          pVertices[j].vertex[1] = pFrame->aliasVertices[j].vertex[2] * pFrame->scale[2] + pFrame->translate[2];
     302
     303          printf("vertices %i --- %f, %f, %f\n",j, pVertices[j].vertex[0], pVertices[j].vertex[1], pVertices[j].vertex[2]);
    302304        }
    303305    }
     
    583585        {
    584586          /* SPEEDUP: *(pVerts + i + 0) = (*(frame->pVertices + i + 0)...  */
    585           pVertex[i][0] = (frame->pVertices[i].v[0] * frame->scale[0]) + frame->translate[0];
    586           pVertex[i][1] = (frame->pVertices[i].v[1] * frame->scale[1]) + frame->translate[1];
    587           pVertex[i][2] = (frame->pVertices[i].v[2] * frame->scale[2]) + frame->translate[2];
    588 
    589           pNormals[i] = frame->pVertices[i].lightNormalIndex;
     587          pVertex[j][0] = (frame->pVertices[j].v[0] * frame->scale[0]) + frame->translate[0];
     588          pVertex[j][1] = (frame->pVertices[j].v[1] * frame->scale[1]) + frame->translate[1];
     589          pVertex[j][2] = (frame->pVertices[j].v[2] * frame->scale[2]) + frame->translate[2];
     590         
     591          printf("pVertex %f, %f, %f\n", pVertex[j][0], pVertex[j][1], pVertex[j][2]);
     592
     593          pNormals[j] = frame->pVertices[j].lightNormalIndex;
    590594        }
    591595    }
     
    780784          glVertex3fv(verticesList[pCommands[2]]);
    781785
    782           //printf("draw vert: %f, %f, %f\n", verticesList[pCommands[2]][0], verticesList[pCommands[2]][1], verticesList[pCommands[2]][2] );
     786          printf("draw vert: %f, %f, %f\n", verticesList[pCommands[2]][0], verticesList[pCommands[2]][1], verticesList[pCommands[2]][2] );
    783787        }
    784788      glEnd();
Note: See TracChangeset for help on using the changeset viewer.