Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2005, 12:58:50 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: importer: having color again

File:
1 edited

Legend:

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

    r3909 r3910  
    1212class Array;
    1313class Vector;
     14template<class T> class tList;
     15
     16
    1417
    1518using namespace std;
     
    2831class Model
    2932{
    30  public:
    31   Model(const char* modelName = NULL);
    32   virtual ~Model(void);
    33 
    34   void setName(const char* name);
    35  
    36   void draw(void) const;
    37   void draw(int groupNumber) const;
    38   void draw(char* groupName) const;
    39   int getGroupCount() const;
    40 
    41  protected:
    42   char* name;            //!< This is the name of the Model.
    43   bool finalized;        //!< Sets the Object to be finalized.
    44  
     33 private:
     34  /////////////
     35  // structs //
     36  /////////////
    4537  //! This is the placeholder of one Vertex beloning to a Face.
    4638  struct FaceElement
     
    7769  };
    7870
     71  char* name;            //!< This is the name of the Model.
     72  bool finalized;        //!< Sets the Object to be finalized.
    7973
    8074  Array* vertices;      //!< The Array that handles the Vertices.
     
    8377  Array* vTexture;      //!< The Array that handles the VertexTextureCoordinates.
    8478
    85  
    8679  Group* firstGroup;    //!< The first of all groups.
    8780  Group* currentGroup;  //!< The currentGroup. this is the one we will work with.
    8881  int groupCount;       //!< The Count of Groups.
    8982
    90   Material* material;   //!< Initial pointer to the Material. This can hold many materials, because Material can be added with Material::addMaterial(..)
    91   float scaleFactor;    //!< The Factor with which the Model should be scaled. \todo maybe one wants to scale the Model after Initialisation
    92 
    9383  bool initGroup(Group* group);
    9484  bool initFace (Face* face);
    95   bool cleanup(void);
     85
    9686  bool cleanupGroup(Group* group);
    9787  bool cleanupFace(Face* face);
    9888  bool cleanupFaceElement(FaceElement* faceElem);
    9989
     90  bool addGLElement(FaceElement* elem);
     91
     92  bool buildVertexNormals(void);
     93
     94 protected:
     95  float scaleFactor;    //!< The Factor with which the Model should be scaled. \todo maybe one wants to scale the Model after Initialisation
     96  Material* material;   //!< Initial pointer to the Material. This can hold many materials, because Material can be added with Material::addMaterial(..)
     97
     98  bool importToGL(void);
     99  void cubeModel(void);
     100
     101  bool cleanup(void);
     102
    100103 public:
     104  Model(const char* modelName = NULL);
     105  virtual ~Model(void);
     106
     107  void setName(const char* name);
     108  inline const char* getName() {return this->name;}
     109 
     110  void draw(void) const;
     111  void draw(int groupNumber) const;
     112  void draw(char* groupName) const;
     113  int getGroupCount() const;
     114
    101115  bool addGroup(const char* groupString);
    102116  bool addVertex(const char* vertexString);
     
    111125  bool addUseMtl(Material* mtl);
    112126  void finalize(void);
    113 
    114  protected:
    115   bool importToGL(void);
    116   bool addGLElement(FaceElement* elem);
    117 
    118   bool buildVertexNormals(void);
    119 
    120   void cubeModel(void);
    121127};
    122128
Note: See TracChangeset for help on using the changeset viewer.