Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6046 in orxonox.OLD


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

orxonox/branches/controll: Should compile on windows again

Location:
branches/spaceshipcontrol/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/defs/class_id.h

    r6010 r6046  
    9191  CL_TEXTURE                    =    0x00c01000,
    9292  CL_MODEL                      =    0x00c02000,
     93  CL_STATIC_MODEL               =    0x00c04000,
     94  CL_VERTEX_ARRAY_MODEL         =    0x00c08000,
    9395
    9496
     
    198200  CL_MATERIAL                   =    0x00000804,
    199201  CL_TEXTURE_SEQUENCE           =    0x00c04805,
    200   CL_VERTEX_ARRAY_MODEL         =    0x00000806,
    201   CL_OBJMODEL                   =    0x00000807,
     202  CL_OBJ_MODEL                  =    0x00000807,
    202203  CL_PROMITIVE_MODEL            =    0x00000808,
    203204  CL_MD2Model                   =    0x00000809,
  • branches/spaceshipcontrol/src/lib/graphics/graphics_engine.cc

    r6011 r6046  
    3636 #include "class_list.h"
    3737 #include "list.h"
    38  #include "model.h"
     38 #include "static_model.h"
    3939#endif
    4040using namespace std;
     
    283283  }
    284284  PRINTF(4)("Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
    285 
    286 }
     285}
     286
    287287
    288288/**
     
    320320    }
    321321    // REBUILDING MODELS
    322     const std::list<BaseObject*>* modelList = ClassList::getList(CL_MODEL);
     322    const std::list<BaseObject*>* modelList = ClassList::getList(CL_STATIC_MODEL);
    323323    if (texList != NULL)
    324324    {
    325325      std::list<BaseObject*>::const_iterator reModel;
    326326      for (reModel = modelList->begin(); reModel != modelList->end(); reModel++)
    327         dynamic_cast<Model*>(*reModel)->rebuild();
     327        dynamic_cast<StaticModel*>(*reModel)->rebuild();
    328328    }
    329329#endif /* __WIN32__ */
  • 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.