Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5308 in orxonox.OLD for trunk/src/lib/graphics/importer/model.cc


Ignore:
Timestamp:
Oct 8, 2005, 12:32:52 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Fixed a reversive BUG in the ResourceManager:
Since resources, that depend on each other are loaded left tgo right they must be unlinked right to left… this cost me 3 hours.
What a luck i found this :)

File:
1 edited

Legend:

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

    r5304 r5308  
    6565
    6666  this->next = NULL;
    67 
    6867}
    6968
     
    383382//////////
    384383/**
    385  *  adds a new Material to the Material List
     384 * adds a new Material to the Material List
    386385 * @param material the Material to add
    387386 * @returns the added material
     
    392391Material* Model::addMaterial(Material* material)
    393392{
     393  if (material == NULL)
     394    return NULL;
    394395  ModelMaterial* modMat = new ModelMaterial;
    395396  modMat->external = true;
     
    408409  ModelMaterial* modMat = new ModelMaterial;
    409410  modMat->external = false;
    410   modMat->material = new Material();
    411   modMat->material->setName(materialName);
     411  modMat->material = new Material(materialName);
    412412
    413413  // adding material to the List of materials
     
    474474  float subbuffer3;
    475475  sscanf (vertexString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    476   PRINTF(5)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
    477476  this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor);
    478477  this->vertexCount++;
     
    507506  float subbuffer3;
    508507  sscanf (normalString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    509   PRINTF(5)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
    510508  this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3);
    511509  this->normalCount++;
     
    543541  float subbuffer2;
    544542  sscanf (vTextureString, "%f %f", &subbuffer1, &subbuffer2);
    545   PRINTF(5)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2);
    546543  this->vTexture->addEntry(subbuffer1);
    547544  this->vTexture->addEntry(1 - subbuffer2);
     
    659656
    660657/**
    661  *  Function that selects a material, if changed in the obj file.
     658 * Function that selects a material, if changed in the obj file.
    662659 * @param matString the Material that will be set.
    663660*/
     
    674671
    675672/**
    676  *  Function that selects a material, if changed in the obj file.
     673 * Function that selects a material, if changed in the obj file.
    677674 * @param mtl the Material that will be set.
    678675*/
     
    11061103  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,16, 7,10,17, 5,11,18, 3,3,19);
    11071104  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,12,20, 0,0,21, 2,2,22, 4,13,23);
    1108 
    1109 }
     1105}
Note: See TracChangeset for help on using the changeset viewer.