Changeset 4122 in orxonox.OLD for orxonox/branches/heightMap/src/lib/graphics/importer/model.cc
- Timestamp:
- May 9, 2005, 11:29:19 AM (20 years ago)
- Location:
- orxonox/branches/heightMap
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/heightMap
- Property svn:externals
-
old new 1 data http://svn.orxonox.ethz.ch/data 1
-
- Property svn:externals
-
orxonox/branches/heightMap/src/lib/graphics/importer/model.cc
r4111 r4122 523 523 524 524 If a face line is found this function will add it to the glList. 525 526 String is different from the argument addFace, in this that the first Vertex/Normal/Texcoord is 1 instead of 0 525 527 */ 526 528 bool Model::addFace (const char* faceString) … … 577 579 \brief adds a new Face 578 580 \param faceElemCount the number of Vertices to add to the Face. 579 \param type 0: vertex only, 1: vertex and normal, 2: vertex and Texture, 3 vertex, normal and texture581 \param type The information Passed with each Vertex 580 582 */ 581 583 bool Model::addFace(int faceElemCount, VERTEX_FORMAT type, ...) … … 594 596 tmpElem = tmpElem->next = new ModelFaceElement; 595 597 596 tmpElem->vertexNumber = va_arg (itemlist, int) -1;598 tmpElem->vertexNumber = va_arg (itemlist, int); 597 599 if (type & TEXCOORD) 598 tmpElem->texCoordNumber = va_arg (itemlist, int) -1;600 tmpElem->texCoordNumber = va_arg (itemlist, int); 599 601 if (type & NORMAL) 600 tmpElem->normalNumber = va_arg(itemlist, int) -1;602 tmpElem->normalNumber = va_arg(itemlist, int); 601 603 this->currentGroup->currentFace->vertexCount++; 602 604 } … … 924 926 this->addVertexNormal (-1.0, 0.0, 0.0); 925 927 926 /* normaleLess-testingMode 927 this->addFace ("1 2 4 3"); 928 this->addFace ("3 4 6 5"); 929 this->addFace ("5 6 8 7"); 930 this->addFace ("7 8 2 1"); 931 this->addFace ("2 8 6 4"); 932 this->addFace ("7 1 3 5"); 933 */ 934 935 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,1, 2,2,2, 4,4,3, 3,3,4); 936 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 3,3,5, 4,4,6, 6,6,7, 5,5,8); 937 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 5,5,9, 6,6,10, 8,8,11, 7,7,12); 938 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,7,13, 8,8,14, 2,10,15, 1,9,16); 939 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,2,17, 8,11,18, 6,12,19, 4,4,20); 940 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,13,21, 1,1,22, 3,3,23, 5,14,24); 941 942 } 928 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,0, 1,1,1, 3,3,2, 2,2,3); 929 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,2,4, 3,3,5, 5,5,6, 4,4,7); 930 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,4,8, 5,5,9, 7,7,10, 6,6,11); 931 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,6,12, 7,7,13, 1,9,14, 0,8,15); 932 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,16, 7,10,17, 5,11,18, 3,3,19); 933 this->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,12,20, 0,0,21, 2,2,22, 4,13,23); 934 935 }
Note: See TracChangeset
for help on using the changeset viewer.