Changeset 4804 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jul 7, 2005, 11:17:56 AM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/abstract_model.h
r4802 r4804 118 118 119 119 120 typedef struct 121 { 122 unsigned int numVertices; 123 unsigned int numTriangles; 124 unsigned int numNormals; 125 unsigned int numTexCoor; 126 127 const float* pVertices; 128 sTriangleExt* pTriangles; 129 const float* pNormals; 130 const float* pTexCoor; 131 132 } modelInfo; 133 134 135 120 136 //! This class defines the basic components of a model 121 137 class AbstractModel : public BaseObject { … … 129 145 130 146 147 131 148 #endif /* _ABSTRACT_MODEL_H */ -
orxonox/trunk/src/lib/graphics/importer/model.cc
r4803 r4804 150 150 this->triangleCount = 0; 151 151 this->triangles = NULL; 152 this->pModelInfo = NULL; 152 153 153 154 this->scaleFactor = 1; … … 212 213 //this->deleteArrays(); 213 214 this->cleanup(); 215 216 /* load the ModelInfo */ 217 this->pModelInfo = new modelInfo; 218 this->pModelInfo->numVertices = this->vertexCount; 219 this->pModelInfo->pVertices = this->vertices->getArray(); 220 this->pModelInfo->numTriangles = this->triangleCount; 221 this->pModelInfo->pTriangles = this->triangles; 222 this->pModelInfo->numNormals = this->normalCount; 223 this->pModelInfo->pNormals = this->normals->getArray(); 224 this->pModelInfo->numTexCoor = this->vTexture->getCount(); 225 this->pModelInfo->pTexCoor = this->vTexture->getArray(); 214 226 215 227 this->finalized = true; -
orxonox/trunk/src/lib/graphics/importer/model.h
r4798 r4804 128 128 inline unsigned int getFaceCount() const { return this->faceCount; }; 129 129 130 inline modelInfo* getModelInfo() const { return this->pModelInfo; } 130 131 131 132 Material* addMaterial(Material* material); … … 180 181 Array<GLfloat>* vTexture; //!< The Array that handles the VertexTextureCoordinates. 181 182 sTriangleExt* triangles; //!< The Array of triangles in the abstract_model.h style 183 modelInfo* pModelInfo; //!< Reference to the modelInfo defined in abstract_model.h 182 184 183 185 ModelGroup* firstGroup; //!< The first of all groups.
Note: See TracChangeset
for help on using the changeset viewer.