Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2005, 2:42:55 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/controll: Should compile on windows again

Location:
branches/spaceshipcontrol/src/lib/graphics/importer
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/lib/graphics/importer/model.cc

    r6033 r6046  
    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;
     
    5454  const GLfloat* pVertices = NULL;
    5555  const GLfloat* pNorm = NULL;
    56  
     56
    5757  glBegin(GL_TRIANGLES);
    5858  for( int i = 0; i < this->pModelInfo.numTriangles; ++i)
     
    6363      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
    6464      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
    65      
     65
    6666      pNorm = &this->pModelInfo.pNormals[this->pModelInfo.pTriangles[i].indexToNormals[1]];
    6767      pVertices = &this->pModelInfo.pVertices[this->pModelInfo.pTriangles[i].indexToVertices[1]];
    6868      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
    6969      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
    70      
     70
    7171      pNorm = &this->pModelInfo.pNormals[this->pModelInfo.pTriangles[i].indexToNormals[2]];
    7272      pVertices = &this->pModelInfo.pVertices[this->pModelInfo.pTriangles[i].indexToVertices[2]];
    7373      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
    7474      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
    75      
     75
    7676    }
    7777  glEnd();
  • branches/spaceshipcontrol/src/lib/graphics/importer/objModel.cc

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

    r6033 r6046  
    143143StaticModel::StaticModel(const char* modelName)
    144144{
    145   this->setClassID(CL_MODEL, "Model");
     145  this->setClassID(CL_STATIC_MODEL, "StaticModel");
    146146  PRINTF(4)("new 3D-Model is being created\n");
    147147  this->setName(modelName);
     
    547547      this->currentGroup->currentFace->vertexCount++;
    548548    }
    549  
     549
    550550  this->currentGroup->faceCount += this->currentGroup->currentFace->vertexCount -2;
    551551  this->faceCount += this->currentGroup->currentFace->vertexCount -2;
  • branches/spaceshipcontrol/src/lib/graphics/importer/vertex_array_model.cc

    r6012 r6046  
    3333VertexArrayModel::VertexArrayModel()
    3434{
    35   this->setClassID(CL_MODEL, "VertexArrayModel");
     35  this->setClassID(CL_VERTEX_ARRAY_MODEL, "VertexArrayModel");
    3636
    3737  this->finalized = false;
     
    8888  glVertexPointer(3, GL_FLOAT, 0, this->vertices.getArray());
    8989  glNormalPointer(GL_FLOAT, 0, this->normals.getArray());
    90   glTexCoordPointer(2, GL_FLOAT, 0, this->texCoords.getArray()); 
     90  glTexCoordPointer(2, GL_FLOAT, 0, this->texCoords.getArray());
    9191
    9292  printf("%d\n", this->indices.getCount());
     
    100100  /*  const GLfloat* pVertices = NULL;
    101101      const GLfloat* pNorm = NULL;
    102      
     102
    103103      glBegin(GL_TRIANGLES);
    104104      for( int i = 0; i < this->triangleCount; ++i)
     
    109109      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
    110110      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
    111      
     111
    112112      pNorm = &this->normals->getArray()[this->triangles[i].indexToNormals[1]];
    113113      pVertices = &this->vertices->getArray()[this->triangles[i].indexToVertices[1]];
    114114      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
    115115      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
    116      
     116
    117117      pNorm = &this->normals->getArray()[this->triangles[i].indexToNormals[2]];
    118118      pVertices = &this->vertices->getArray()[this->triangles[i].indexToVertices[2]];
    119119      glNormal3f(pNorm[0], pNorm[1], pNorm[2]);
    120120      glVertex3f(pVertices[0], pVertices[1], pVertices[2]);
    121      
     121
    122122      }
    123123      glEnd();
Note: See TracChangeset for help on using the changeset viewer.