Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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/importer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 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.