Changeset 4109 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- May 7, 2005, 5:10:38 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/array.cc
r3590 r4109 112 112 113 113 /** 114 \brief Gives back the array !! MUST be executed AFTER finalize.115 \returns The created array.116 */117 GLfloat* Array::getArray ()118 {119 return this->array;120 }121 122 /**123 \returns The Count of entries in the Array124 */125 int Array::getCount()126 {127 return this->entryCount;128 }129 130 /**131 114 \brief Simple debug info about the Array 132 115 */ 133 void Array::debug ( )116 void Array::debug (void) const 134 117 { 135 118 PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array); -
orxonox/trunk/src/lib/graphics/importer/array.h
r3590 r4109 23 23 void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2); 24 24 25 GLfloat* getArray (); 26 int getCount(); 27 void debug(void); 25 /** \returns The array */ 26 inline const GLfloat* getArray () const {return this->array;} 27 /** \returns The Count of entries in the Array*/ 28 inline int getCount(void)const {return this->entryCount;} 29 void debug(void) const ; 28 30 private: 29 31 //! One entry of the Array -
orxonox/trunk/src/lib/graphics/importer/model.cc
r4108 r4109 36 36 ModelFaceElement::ModelFaceElement() 37 37 { 38 this->vertexNumber = -1; 39 this->normalNumber = -1; 40 this->texCoordNumber = -1; 41 38 42 this->next = NULL; 39 43 } … … 556 560 if (vertex) 557 561 tmpElem->vertexNumber = atoi(vertex)-1; 558 else559 tmpElem->vertexNumber = -1;560 562 if (texture) 561 563 tmpElem->texCoordNumber = atoi(texture)-1; 562 else563 tmpElem->texCoordNumber = -1;564 564 if (normal) 565 565 tmpElem->normalNumber = atoi(normal)-1; 566 else567 tmpElem->normalNumber = -1;568 566 569 567 faceString += tmpLen; … … 845 843 if (elem->texCoordNumber != -1) 846 844 { 847 if (likely(elem->texCoordNumber < =this->texCoordCount))845 if (likely(elem->texCoordNumber < this->texCoordCount)) 848 846 glTexCoord2fv(this->vTexture->getArray() + elem->texCoordNumber * 2); 849 847 else … … 853 851 if (elem->normalNumber != -1) 854 852 { 855 if (likely(elem->normalNumber < =this->normalCount))853 if (likely(elem->normalNumber < this->normalCount)) 856 854 glNormal3fv(this->normals->getArray() + elem->normalNumber * 3); 857 855 else … … 861 859 if (elem->vertexNumber != -1) 862 860 { 863 if (likely(elem->vertexNumber < = this->vertexCount))861 if (likely(elem->vertexNumber < this->vertexCount -1000)) 864 862 glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3); 865 863 else
Note: See TracChangeset
for help on using the changeset viewer.