Changeset 3910 in orxonox.OLD for orxonox/trunk/src/lib/graphics/importer/model.h
- Timestamp:
- Apr 21, 2005, 12:58:50 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/model.h
r3909 r3910 12 12 class Array; 13 13 class Vector; 14 template<class T> class tList; 15 16 14 17 15 18 using namespace std; … … 28 31 class Model 29 32 { 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 ///////////// 45 37 //! This is the placeholder of one Vertex beloning to a Face. 46 38 struct FaceElement … … 77 69 }; 78 70 71 char* name; //!< This is the name of the Model. 72 bool finalized; //!< Sets the Object to be finalized. 79 73 80 74 Array* vertices; //!< The Array that handles the Vertices. … … 83 77 Array* vTexture; //!< The Array that handles the VertexTextureCoordinates. 84 78 85 86 79 Group* firstGroup; //!< The first of all groups. 87 80 Group* currentGroup; //!< The currentGroup. this is the one we will work with. 88 81 int groupCount; //!< The Count of Groups. 89 82 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 Initialisation92 93 83 bool initGroup(Group* group); 94 84 bool initFace (Face* face); 95 bool cleanup(void); 85 96 86 bool cleanupGroup(Group* group); 97 87 bool cleanupFace(Face* face); 98 88 bool cleanupFaceElement(FaceElement* faceElem); 99 89 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 100 103 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 101 115 bool addGroup(const char* groupString); 102 116 bool addVertex(const char* vertexString); … … 111 125 bool addUseMtl(Material* mtl); 112 126 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);121 127 }; 122 128
Note: See TracChangeset
for help on using the changeset viewer.