Changeset 9830 in orxonox.OLD for branches/new_class_id/src/lib/graphics/importer/static_model_data.h
- Timestamp:
- Sep 26, 2006, 2:54:38 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/importer/static_model_data.h
r9829 r9830 4 4 */ 5 5 6 #ifndef _STATIC_MODEL_ H7 #define _STATIC_MODEL_ H6 #ifndef _STATIC_MODEL_DATA_H 7 #define _STATIC_MODEL_DATA_H 8 8 9 9 #include "model.h" … … 11 11 #include "material.h" 12 12 #include <vector> 13 #include "count_pointer.h" 14 13 15 14 16 // definition of different modes for setting up Faces … … 31 33 class ModelFaceElement 32 34 { 33 35 public: 34 36 ModelFaceElement(); 35 37 ~ModelFaceElement(); … … 45 47 class ModelFace 46 48 { 47 49 public: 48 50 ModelFace(); 49 51 ~ModelFace(); … … 59 61 class ModelGroup 60 62 { 61 63 public: 62 64 ModelGroup(); 63 65 ~ModelGroup(); … … 94 96 ObjectListDeclaration(StaticModelData); 95 97 public: 98 typedef CountPointer<StaticModelData> Pointer; 99 100 public: 96 101 StaticModelData(const std::string& modelName = ""); 97 102 virtual ~StaticModelData(); 98 103 99 v irtual void draw() const;104 void draw() const; 100 105 void draw(int groupNumber) const; 101 106 void draw(const std::string& groupName) const; … … 108 113 bool addGroup(const std::string& groupString); 109 114 115 void setScaleFactor(float scaleFactor) { this->scaleFactor = scaleFactor; }; 116 110 117 bool addVertex(const std::string& vertexString); 111 118 bool addVertex(float x, float y, float z); 112 119 113 120 bool addFace(const std::string& faceString); 114 bool addFace(int faceElemCount, VERTEX_FORMAT type, ...);121 bool addFace(int faceElemCount, VERTEX_FORMAT type, va_list args); 115 122 116 123 bool addVertexNormal(const std::string& normalString); … … 126 133 127 134 128 protected: 129 void cubeModel(); 135 const std::vector<GLfloat>& getVertices() const { return this->vertices; }; 136 const std::vector<GLfloat>& getNormals() const { return this->normals; }; 137 const std::vector<GLfloat>& getTexCoords() const { return this->vTexture; }; 138 const std::vector<sTriangleExt>& getTriangles() const { return this->triangles; }; 139 ///! HACK SOLUTION sTriangleExt should be const in the modelInfo. 140 sTriangleExt* getTrianglesExt() { return &this->triangles[0]; }; 130 141 142 float getScaleFactor() const { return scaleFactor; } 143 144 protected: 131 145 Material* findMaterialByName(const std::string& materialName); 132 146 133 protected: 134 float scaleFactor; //!< The Factor with which the Model should be scaled. @todo maybe one wants to scale the Model after Initialisation 135 136 private: 147 private: 137 148 bool buildVertexNormals(); 138 149 … … 144 155 bool cleanup(); 145 156 146 157 private: 147 158 bool finalized; //!< Sets the Object to be finalized. 159 160 float scaleFactor; //!< The Factor with which the Model should be scaled. @todo maybe one wants to scale the Model after Initialisation 148 161 149 162 unsigned int faceCount; //!< A modelwide Counter for the faces … … 162 175 }; 163 176 164 #endif 177 #endif /* _STATIC_MODEL_DATA_H */
Note: See TracChangeset
for help on using the changeset viewer.