Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4794 in orxonox.OLD


Ignore:
Timestamp:
Jul 6, 2005, 1:01:20 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: now will take array indexes directly from the ModelFaceElement, Array::getIndex(…) not used but I will keep it, since its a good thing to have

Location:
orxonox/trunk/src/lib/graphics/importer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/importer/abstract_model.h

    r4787 r4794  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    1111   ### File Specific:
    1212   main-programmer: Patrick Boenzli
    13    co-programmer: 
     13   co-programmer:
    1414*/
    1515
    16 /*! 
     16/*!
    1717    \file abstract_model.h
    1818    \brief Definition of an abstract model. containing all needed for other model
     
    7373
    7474
     75//! holds the information about a triangle
     76typedef struct
     77{
     78  unsigned int   indexToVertices[3];   //!< index to the verteces of the triangle
     79  unsigned int   indexToTexCoor[3];    //!< index to the texture coordinates
     80} sTriangleExt;
     81
     82
    7583//! the command list of the md2 model, very md2 specific
    7684typedef struct
     
    101109  float            lastTime;             //!< last time stamp
    102110  float            interpolationState;   //!< the state of the animation [0..1]
    103  
     111
    104112  int              type;                 //!< animation type
    105113
  • orxonox/trunk/src/lib/graphics/importer/model.cc

    r4793 r4794  
    826826  this->normals->finalizeArray();
    827827
    828   if( unlikely((this->triangles = new sTriangle[this->vertices->getCount()]) == 0));
     828  if( unlikely((this->triangles = new sTriangleExt[this->vertices->getCount()]) == 0));
    829829  {
    830830    PRINTF(2)("Could not allocate memory for triangle list\n");
     
    850850        for(int j = 0; j < 3; ++j)
    851851        {
    852           //this->triangles[i].indexToVertices[j] = this->vertices->getIndex(tmpElem);
     852          this->triangles[i].indexToVertices[j] = (unsigned int)tmpElem->vertexNumber;
     853          this->triangles[i].indexToTexCoor[j] = (unsigned int)tmpElem->texCoordNumber;
    853854          tmpElem = tmpElem->next;
    854855        }
  • orxonox/trunk/src/lib/graphics/importer/model.h

    r4793 r4794  
    178178  Array<GLfloat>*  normals;         //!< The Array that handles the Normals.
    179179  Array<GLfloat>*  vTexture;        //!< The Array that handles the VertexTextureCoordinates.
    180   sTriangle*       triangles;       //!< The Array of triangles in the abstract_model.h style
     180  sTriangleExt*    triangles;       //!< The Array of triangles in the abstract_model.h style
    181181
    182182  ModelGroup*      firstGroup;      //!< The first of all groups.
Note: See TracChangeset for help on using the changeset viewer.