Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3911 in orxonox.OLD


Ignore:
Timestamp:
Apr 21, 2005, 1:11:36 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: minor changes at model

Location:
orxonox/trunk/src
Files:
6 edited

Legend:

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

    r3910 r3911  
    2323#include "array.h"
    2424#include "vector.h"
     25#include "list.h"
    2526
    2627using namespace std;
     
    5051  this->normals = new Array();
    5152
     53  this->materialList = new tList<Material>;
    5254}
    5355
     
    6870      PRINT(4)("\n");
    6971
    70   PRINTF(4)("Deleting display Lists.\n");
     72  PRINTF(5)("Deleting display Lists.\n");
    7173  Group* walker = this->firstGroup;
    7274  while (walker != NULL)
     
    7880    }
    7981
    80   PRINTF(4)("Deleting Materials.\n");
     82  PRINTF(5)("Deleting Materials.\n");
    8183  if (this->material)
    8284    delete this->material;
     85
     86  // deleting the MaterialList
     87  delete materialList;
    8388}
    8489
  • orxonox/trunk/src/lib/graphics/importer/model.h

    r3910 r3911  
    8484  bool initFace (Face* face);
    8585
     86  bool buildVertexNormals(void);
     87
     88  bool importToGL(void);
     89  bool addGLElement(FaceElement* elem);
     90
     91  bool cleanup(void);
    8692  bool cleanupGroup(Group* group);
    8793  bool cleanupFace(Face* face);
    8894  bool cleanupFaceElement(FaceElement* faceElem);
    8995
    90   bool addGLElement(FaceElement* elem);
    9196
    92   bool buildVertexNormals(void);
     97  tList<Material>* materialList;
    9398
    9499 protected:
     
    96101  Material* material;   //!< Initial pointer to the Material. This can hold many materials, because Material can be added with Material::addMaterial(..)
    97102
    98   bool importToGL(void);
    99103  void cubeModel(void);
    100 
    101   bool cleanup(void);
    102104
    103105 public:
  • orxonox/trunk/src/lib/graphics/importer/objModel.cc

    r3910 r3911  
    3838  this->importFile (fileName);
    3939
    40   this->importToGL ();
    41 
    42   this->cleanup();
     40  this->finalize();
    4341}
    4442
     
    211209  char buffer[PARSELINELENGTH];
    212210  Material* tmpMat = material;
     211
    213212  while(fgets(buffer, PARSELINELENGTH, stream))
    214213    {
  • orxonox/trunk/src/lib/graphics/importer/primitive_model.cc

    r3909 r3911  
    5252      break;
    5353    }
    54   this->importToGL ();
    55 
    56   this->cleanup();
     54  this->finalize();
    5755}
    5856
  • orxonox/trunk/src/lib/graphics/text_engine.cc

    r3845 r3911  
    3636#include "vector.h"
    3737#include "debug.h"
    38 
     38#include "list.h"
    3939
    4040////////////
  • orxonox/trunk/src/util/resource_manager.h

    r3883 r3911  
    1414#include "base_object.h"
    1515
    16 // FORWARD DEFINITION \\
    17 //template<class T> class tList;
    18 #include "list.h"                //! \todo do this by forward definition (ask Patrick)
     16// FORWARD DEFINITION
     17template<class T> class tList;
    1918
    2019//! An eumerator for different fileTypes the resourceManager supports \todo WAV, MP3, OGG support
Note: See TracChangeset for help on using the changeset viewer.