Changeset 6162 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Dec 19, 2005, 4:52:01 PM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/graphics_engine.cc
r6142 r6162 38 38 #include "class_list.h" 39 39 #include "list.h" 40 #include " model.h"40 #include "static_model.h" 41 41 #endif 42 42 using namespace std; … … 285 285 } 286 286 PRINTF(4)("Status: Using GLEW %s\n", glewGetString(GLEW_VERSION)); 287 288 } 287 } 288 289 289 290 290 /** … … 322 322 } 323 323 // REBUILDING MODELS 324 const std::list<BaseObject*>* modelList = ClassList::getList(CL_ MODEL);324 const std::list<BaseObject*>* modelList = ClassList::getList(CL_STATIC_MODEL); 325 325 if (texList != NULL) 326 326 { 327 327 std::list<BaseObject*>::const_iterator reModel; 328 328 for (reModel = modelList->begin(); reModel != modelList->end(); reModel++) 329 dynamic_cast< Model*>(*reModel)->rebuild();329 dynamic_cast<StaticModel*>(*reModel)->rebuild(); 330 330 } 331 331 #endif /* __WIN32__ */ -
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.