Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6162 in orxonox.OLD for trunk/src/lib/graphics


Ignore:
Timestamp:
Dec 19, 2005, 4:52:01 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the spaceshipcontroll branche into the trunk
merged with command
svn merge -r6036:HEAD spaceshipcontrol/ ../trunk/
no conflicts

Location:
trunk/src/lib/graphics
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r6142 r6162  
    3838 #include "class_list.h"
    3939 #include "list.h"
    40  #include "model.h"
     40 #include "static_model.h"
    4141#endif
    4242using namespace std;
     
    285285  }
    286286  PRINTF(4)("Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
    287 
    288 }
     287}
     288
    289289
    290290/**
     
    322322    }
    323323    // REBUILDING MODELS
    324     const std::list<BaseObject*>* modelList = ClassList::getList(CL_MODEL);
     324    const std::list<BaseObject*>* modelList = ClassList::getList(CL_STATIC_MODEL);
    325325    if (texList != NULL)
    326326    {
    327327      std::list<BaseObject*>::const_iterator reModel;
    328328      for (reModel = modelList->begin(); reModel != modelList->end(); reModel++)
    329         dynamic_cast<Model*>(*reModel)->rebuild();
     329        dynamic_cast<StaticModel*>(*reModel)->rebuild();
    330330    }
    331331#endif /* __WIN32__ */
  • trunk/src/lib/graphics/importer/model.cc

    r6073 r6162  
    2828Model::Model()
    2929{
    30 //   this->setClassID(CL_PROTO_ID, "ProtoClass");
     30  this->setClassID(CL_MODEL, "Model");
    3131  this->pModelInfo.numVertices = 0;
    3232  this->pModelInfo.numTriangles = 0;
     
    5555  const GLfloat* pVertices = NULL;
    5656  const GLfloat* pNorm = NULL;
    57  
     57
    5858  glBegin(GL_TRIANGLES);
    5959  for( int i = 0; i < this->pModelInfo.numTriangles; ++i)
     
    6464      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
    6565      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
    66      
     66
    6767      pNorm = &this->pModelInfo.pNormals[this->pModelInfo.pTriangles[i].indexToNormals[1]];
    6868      pVertices = &this->pModelInfo.pVertices[this->pModelInfo.pTriangles[i].indexToVertices[1]];
    6969      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
    7070      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
    71      
     71
    7272      pNorm = &this->pModelInfo.pNormals[this->pModelInfo.pTriangles[i].indexToNormals[2]];
    7373      pVertices = &this->pModelInfo.pVertices[this->pModelInfo.pTriangles[i].indexToVertices[2]];
    7474      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
    7575      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
    76      
     76
    7777    }
    7878  glEnd();
  • trunk/src/lib/graphics/importer/objModel.cc

    r6022 r6162  
    3434OBJModel::OBJModel(const char* fileName, float scaling) : StaticModel(fileName)
    3535{
     36  this->setClassID(CL_OBJ_MODEL, "OBJModel");
     37
    3638  this->objPath = "./";
    3739
  • trunk/src/lib/graphics/importer/static_model.cc

    r6072 r6162  
    144144StaticModel::StaticModel(const char* modelName)
    145145{
    146   this->setClassID(CL_MODEL, "Model");
     146  this->setClassID(CL_STATIC_MODEL, "StaticModel");
    147147  PRINTF(4)("new 3D-Model is being created\n");
    148148  this->setName(modelName);
     
    550550      this->currentGroup->currentFace->vertexCount++;
    551551    }
    552  
     552
    553553  this->currentGroup->faceCount += this->currentGroup->currentFace->vertexCount -2;
    554554  this->faceCount += this->currentGroup->currentFace->vertexCount -2;
Note: See TracChangeset for help on using the changeset viewer.