Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2853 in orxonox.OLD for orxonox/trunk/src/object.h


Ignore:
Timestamp:
Nov 14, 2004, 6:41:02 AM (21 years ago)
Author:
bensch
Message:

orxonox/trunk/src: merged importer to trunk again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/object.h

    r2835 r2853  
    11/*!
    2  \file object.h
    3  \brief Contains the Object Class that handles 3D-Objects
     2  \file object.h
     3  \brief Contains the Object Class that handles 3D-Objects
    44*/
    55
     
    1616using namespace std;
    1717
     18extern int verbose; //!< fill be removed and added again as a verbose-class
     19
     20
    1821//! Class that handles 3D-Objects. it can also read them in and display them.
    1922class Object
     
    2932  bool finalize(void);
    3033  void draw (void);
    31 
    32   bool readFromObjFile (char* fileName);
    33 
     34  void draw (int groupNumber);
     35  void draw (char* groupName);
     36  int getGroupCount();
    3437
    3538 private:
    36   GLuint listNumber;
    37   Array* vertices;
    38   int verticesCount;
    39   Array* colors;
    40   Array* normals;
    41   Array* vTexture;
     39  //! Group to handle multiple Objects per obj-file
     40  struct Group
     41  {
     42    char* name;
     43
     44    GLuint listNumber;
     45    Array* vertices;
     46    int verticesCount;
     47    Array* colors;
     48    Array* normals;
     49    Array* vTexture;
     50    int faceMode;
     51
     52    int firstVertex;
     53    int firstNormal;
     54    int firstVertexTexture;
     55
     56    Group* nextGroup;
     57  };
     58 
     59  Group* firstGroup; //!< the first of all groups.
     60  Group* currentGroup; //!< the currentGroup. this is the one we will work with.
     61  int groupCount;
     62
     63  bool readingVertices;
     64
    4265  char* objFileName;
    4366  char* mtlFileName;
    44   int faceMode;
    45   bool readVertices;
     67
    4668  Material* material;
    4769  float scaleFactor;
     
    4971  ifstream* OBJ_FILE;
    5072  ifstream* MTL_FILE;
     73
     74  bool initGroup(Group* group);
     75  bool finalizeGroup (Group* group);
     76
     77
     78  ///// readin ///
     79  bool readFromObjFile (char* fileName);
    5180 
    5281  bool readVertex (char* vertexString);
     
    5584  bool readVertexNormal (char* normalString);
    5685  bool readVertexTexture (char* vTextureString);
     86  bool readGroup (char* groupString);
    5787  bool readMtlLib (char* matFile);
    5888  bool readUseMtl (char* mtlString);
Note: See TracChangeset for help on using the changeset viewer.