Changeset 6046 in orxonox.OLD for branches/spaceshipcontrol/src/lib/graphics/importer/model.cc
- Timestamp:
- Dec 11, 2005, 2:42:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/lib/graphics/importer/model.cc
r6033 r6046 28 28 Model::Model() 29 29 { 30 // this->setClassID(CL_PROTO_ID, "ProtoClass");30 this->setClassID(CL_MODEL, "Model"); 31 31 this->pModelInfo.numVertices = 0; 32 32 this->pModelInfo.numTriangles = 0; … … 54 54 const GLfloat* pVertices = NULL; 55 55 const GLfloat* pNorm = NULL; 56 56 57 57 glBegin(GL_TRIANGLES); 58 58 for( int i = 0; i < this->pModelInfo.numTriangles; ++i) … … 63 63 glNormal3f(pNorm[0], pNorm[1], pNorm[2]); 64 64 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 65 65 66 66 pNorm = &this->pModelInfo.pNormals[this->pModelInfo.pTriangles[i].indexToNormals[1]]; 67 67 pVertices = &this->pModelInfo.pVertices[this->pModelInfo.pTriangles[i].indexToVertices[1]]; 68 68 glNormal3f(pNorm[0], pNorm[1], pNorm[2]); 69 69 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 70 70 71 71 pNorm = &this->pModelInfo.pNormals[this->pModelInfo.pTriangles[i].indexToNormals[2]]; 72 72 pVertices = &this->pModelInfo.pVertices[this->pModelInfo.pTriangles[i].indexToVertices[2]]; 73 73 glNormal3f(pNorm[0], pNorm[1], pNorm[2]); 74 74 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 75 75 76 76 } 77 77 glEnd();
Note: See TracChangeset
for help on using the changeset viewer.