Changeset 4794 in orxonox.OLD for orxonox/trunk/src/lib/graphics/importer
- Timestamp:
- Jul 6, 2005, 1:01:20 PM (19 years ago)
- 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 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 … … 11 11 ### File Specific: 12 12 main-programmer: Patrick Boenzli 13 co-programmer: 13 co-programmer: 14 14 */ 15 15 16 /*! 16 /*! 17 17 \file abstract_model.h 18 18 \brief Definition of an abstract model. containing all needed for other model … … 73 73 74 74 75 //! holds the information about a triangle 76 typedef 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 75 83 //! the command list of the md2 model, very md2 specific 76 84 typedef struct … … 101 109 float lastTime; //!< last time stamp 102 110 float interpolationState; //!< the state of the animation [0..1] 103 111 104 112 int type; //!< animation type 105 113 -
orxonox/trunk/src/lib/graphics/importer/model.cc
r4793 r4794 826 826 this->normals->finalizeArray(); 827 827 828 if( unlikely((this->triangles = new sTriangle [this->vertices->getCount()]) == 0));828 if( unlikely((this->triangles = new sTriangleExt[this->vertices->getCount()]) == 0)); 829 829 { 830 830 PRINTF(2)("Could not allocate memory for triangle list\n"); … … 850 850 for(int j = 0; j < 3; ++j) 851 851 { 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; 853 854 tmpElem = tmpElem->next; 854 855 } -
orxonox/trunk/src/lib/graphics/importer/model.h
r4793 r4794 178 178 Array<GLfloat>* normals; //!< The Array that handles the Normals. 179 179 Array<GLfloat>* vTexture; //!< The Array that handles the VertexTextureCoordinates. 180 sTriangle *triangles; //!< The Array of triangles in the abstract_model.h style180 sTriangleExt* triangles; //!< The Array of triangles in the abstract_model.h style 181 181 182 182 ModelGroup* firstGroup; //!< The first of all groups.
Note: See TracChangeset
for help on using the changeset viewer.