Changeset 6162 in orxonox.OLD for trunk/src/lib/graphics/importer
- Timestamp:
- Dec 19, 2005, 4:52:01 PM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/model.cc
r6073 r6162 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; … … 55 55 const GLfloat* pVertices = NULL; 56 56 const GLfloat* pNorm = NULL; 57 57 58 58 glBegin(GL_TRIANGLES); 59 59 for( int i = 0; i < this->pModelInfo.numTriangles; ++i) … … 64 64 glNormal3f(pNorm[0], pNorm[1], pNorm[2]); 65 65 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 66 66 67 67 pNorm = &this->pModelInfo.pNormals[this->pModelInfo.pTriangles[i].indexToNormals[1]]; 68 68 pVertices = &this->pModelInfo.pVertices[this->pModelInfo.pTriangles[i].indexToVertices[1]]; 69 69 glNormal3f(pNorm[0], pNorm[1], pNorm[2]); 70 70 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 71 71 72 72 pNorm = &this->pModelInfo.pNormals[this->pModelInfo.pTriangles[i].indexToNormals[2]]; 73 73 pVertices = &this->pModelInfo.pVertices[this->pModelInfo.pTriangles[i].indexToVertices[2]]; 74 74 glNormal3f(pNorm[0], pNorm[1], pNorm[2]); 75 75 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 76 76 77 77 } 78 78 glEnd(); -
trunk/src/lib/graphics/importer/objModel.cc
r6022 r6162 34 34 OBJModel::OBJModel(const char* fileName, float scaling) : StaticModel(fileName) 35 35 { 36 this->setClassID(CL_OBJ_MODEL, "OBJModel"); 37 36 38 this->objPath = "./"; 37 39 -
trunk/src/lib/graphics/importer/static_model.cc
r6072 r6162 144 144 StaticModel::StaticModel(const char* modelName) 145 145 { 146 this->setClassID(CL_ MODEL, "Model");146 this->setClassID(CL_STATIC_MODEL, "StaticModel"); 147 147 PRINTF(4)("new 3D-Model is being created\n"); 148 148 this->setName(modelName); … … 550 550 this->currentGroup->currentFace->vertexCount++; 551 551 } 552 552 553 553 this->currentGroup->faceCount += this->currentGroup->currentFace->vertexCount -2; 554 554 this->faceCount += this->currentGroup->currentFace->vertexCount -2;
Note: See TracChangeset
for help on using the changeset viewer.