Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 18, 2005, 11:52:15 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: merged trunk back to levelloader
merged with command:
svn merge -r 3499:HEAD trunk branches/levelloader

Conflicts in
C track_manager.h
C world_entities/player.cc
C world_entities/player.h
C world_entities/environment.h
C lib/coord/p_node.cc
C defs/debug.h
C track_manager.cc
C story_entities/campaign.h

solved in merge-favouring. It was quite easy because Chris only worked on the headers, and he didi it quite clean. Thats the spirit :)

Conflits in world.cc are a MESS: fix it

File:
1 edited

Legend:

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

    r3499 r3605  
    1313   co-programmer: ...
    1414*/
     15
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
    1517
    1618#include "model.h"
     
    8082Model::~Model(void)
    8183{
    82   PRINTF(3)("Deleting Model ");
     84  PRINTF(4)("Deleting Model ");
    8385  if (this->name)
    8486    {
    85       PRINT(3)("%s\n", this->name);
     87      PRINT(4)("%s\n", this->name);
    8688      delete []this->name;
    8789    }
    8890  else
    89       PRINT(3)("\n");
    90 
    91   PRINTF(3)("Deleting display Lists.\n");
     91      PRINT(4)("\n");
     92
     93  PRINTF(4)("Deleting display Lists.\n");
    9294  Group* walker = this->firstGroup;
    9395  while (walker != NULL)
     
    99101    }
    100102
    101   PRINTF(3)("Deleting Materials.\n");
     103  PRINTF(4)("Deleting Materials.\n");
    102104  if (this->material)
    103105    delete this->material;
     
    122124void Model::draw (void) const
    123125{
    124   PRINTF(2)("drawing the 3D-Models\n");
     126  PRINTF(4)("drawing the 3D-Models\n");
    125127  Group* walker = this->firstGroup;
    126128  while (walker != NULL)
    127129    {
    128       PRINTF(3)("Drawing model %s\n", walker->name);
     130      PRINTF(5)("Drawing model %s\n", walker->name);
    129131      glCallList (walker->listNumber);
    130132      walker = walker->next;
     
    142144  if (groupNumber >= this->groupCount)
    143145    {
    144       PRINTF(1)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
     146      PRINTF(2)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
    145147      return;
    146148    }
    147   PRINTF(2)("drawing the requested 3D-Models if found.\n");
     149  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    148150  Group* walker = this->firstGroup;
    149151  int counter = 0;
     
    152154      if (counter == groupNumber)
    153155        {
    154           PRINTF(2)("Drawing model number %i named %s\n", counter, walker->name);
     156          PRINTF(4)("Drawing model number %i named %s\n", counter, walker->name);
    155157          glCallList (walker->listNumber);
    156158          return;
     
    159161      walker = walker->next;
    160162    }
    161   PRINTF(1)("Model number %i in %s not Found.\n", groupNumber, this->name);
     163  PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->name);
    162164  return;
    163165
     
    172174void Model::draw (char* groupName) const
    173175{
    174   PRINTF(2)("drawing the requested 3D-Models if found.\n");
     176  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    175177  Group* walker = this->firstGroup;
    176178  while (walker != NULL)
     
    178180      if (!strcmp(walker->name, groupName))
    179181        {
    180           PRINTF(2)("Drawing model %s\n", walker->name);
     182          PRINTF(4)("Drawing model %s\n", walker->name);
    181183          glCallList (walker->listNumber);
    182184          return;
     
    184186      walker = walker->next;
    185187    }
    186   PRINTF(1)("Model Named %s in %s not Found.\n", groupName, this->name);
     188  PRINTF(2)("Model Named %s in %s not Found.\n", groupName, this->name);
    187189  return;
    188190}
     
    204206bool Model::initialize (void)
    205207{
    206   PRINTF(2)("new 3D-Model is being created\n");
     208  PRINTF(4)("new 3D-Model is being created\n");
    207209
    208210  this->name = NULL;
     
    243245bool Model::initGroup(Group* group)
    244246{
    245   PRINTF(3)("Adding new Group\n");
     247  PRINTF(4)("Adding new Group\n");
    246248  group->name = "";
    247249  group->faceMode = -1;
     
    277279bool Model::cleanup(void)
    278280{
    279   PRINTF(3)("cleaning up the 3D-Model to save Memory.\n");
     281  PRINTF(4)("cleaning up the 3D-Model to save Memory.\n");
    280282
    281283  if (this->vertices)
     
    296298bool Model::cleanupGroup (Group* group)
    297299{
    298   PRINTF(3)("Cleaning up group\n");
     300  PRINTF(5)("Cleaning up group\n");
    299301  if (group->firstFace != NULL)
    300302    {
     
    314316bool Model::cleanupFace (Face* face)
    315317{
    316   PRINTF(3)("Cleaning up Face\n");
     318  PRINTF(5)("Cleaning up Face\n");
    317319
    318320  if (face->materialString != NULL)
     
    355357bool Model::addGroup (char* groupString)
    356358{
    357   PRINTF(3)("Read Group: %s.\n", groupString);
     359  PRINTF(5)("Read Group: %s.\n", groupString);
    358360  if (this->groupCount != 0 && this->currentGroup->faceCount>0)
    359361    {
     
    384386  float subbuffer3;
    385387  sscanf (vertexString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    386   PRINTF(3)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
     388  PRINTF(5)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
    387389  this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor);
    388390  return true;
     
    398400bool Model::addVertex(const float x, const float y, const float z)
    399401{
    400   PRINTF(4)("reading in a vertex: %f %f %f\n", x, y, z);
     402  PRINTF(5)("reading in a vertex: %f %f %f\n", x, y, z);
    401403  this->vertices->addEntry(x*scaleFactor, y*scaleFactor, z*scaleFactor);
    402404  return true;
     
    513515  float subbuffer3;
    514516  sscanf (normalString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    515   PRINTF(3)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
     517  PRINTF(5)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
    516518  this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3);
    517519  return true;
     
    544546  float subbuffer2;
    545547  sscanf (vTextureString, "%f %f", &subbuffer1, &subbuffer2);
    546   PRINTF(3)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2);
     548  PRINTF(5)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2);
    547549  this->vTexture->addEntry(subbuffer1);
    548550  this->vTexture->addEntry(subbuffer2);
     
    610612      if ((this->currentGroup->listNumber = glGenLists(1)) == 0)
    611613        {
    612           PRINTF(1)("list could not be created for this Model\n");
     614          PRINTF(2)("glList could not be created for this Model\n");
    613615          return false;
    614616        }
     
    628630                {
    629631                  tmpMat->select();
    630                   PRINTF(2)("using material %s for coming Faces.\n", tmpFace->materialString);
     632                  PRINTF(5)("using material %s for coming Faces.\n", tmpFace->materialString);
    631633                }
    632634              else
    633                 PRINTF(1)("material %s not found.\n", tmpFace->materialString);
     635                PRINTF(2)("material %s not found.\n", tmpFace->materialString);
    634636
    635637
     
    646648             
    647649              this->currentGroup->faceMode = 3;
    648               PRINTF(3)("found triag.\n");
     650              PRINTF(5)("found triag.\n");
    649651            }
    650652         
     
    658660                }
    659661              this->currentGroup->faceMode = 4;
    660               PRINTF(3)("found quad.\n");
     662              PRINTF(5)("found quad.\n");
    661663            }
    662664         
     
    666668                glEnd();
    667669              glBegin(GL_POLYGON);
    668               PRINTF(3)("Polygon with %i faces found.", tmpFace->vertexCount);
     670              PRINTF(5)("Polygon with %i faces found.", tmpFace->vertexCount);
    669671              this->currentGroup->faceMode = tmpFace->vertexCount;
    670672            }
     
    698700bool Model::addGLElement (FaceElement* elem)
    699701{
    700   PRINTF(3)("importing grafical Element to openGL.\n");
     702  PRINTF(5)("importing grafical Element to openGL.\n");
    701703
    702704  if (elem->texCoordNumber != -1)
     
    721723{
    722724 
    723   PRINTF(2)("Normals are being calculated.\n");
     725  PRINTF(4)("Normals are being calculated.\n");
    724726
    725727  Vector* normArray = new Vector [vertices->getCount()/3];
     
    778780    {
    779781      normArray[i].normalize();
    780       PRINTF(3)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
     782      PRINTF(5)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
    781783     
    782784      this->normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z);
     
    881883        //printf ("%f %f\n", vz, sin (vz));
    882884        if (i==0.0)
    883                   printf("%f, %f\n", j/df*2.0*PI, cos(j/df*PI));
     885          PRINTF(0)("%f, %f\n", j/df*2.0*PI, cos(j/df*PI));
    884886      }
    885887    }
Note: See TracChangeset for help on using the changeset viewer.