Changeset 5709 in orxonox.OLD for branches/collision_detection/src/lib/graphics/importer
- Timestamp:
- Nov 22, 2005, 4:03:53 PM (19 years ago)
- Location:
- branches/collision_detection/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/collision_detection/src/lib/graphics/importer/abstract_model.h
r5672 r5709 128 128 129 129 public: 130 AbstractModel() {} 130 AbstractModel() { 131 this->pModelInfo.numVertices = 0; 132 this->pModelInfo.numTriangles = 0; 133 this->pModelInfo.numNormals = 0; 134 this->pModelInfo.numTexCoor = 0; 135 136 this->pModelInfo.pVertices = NULL; 137 this->pModelInfo.pTriangles = NULL; 138 this->pModelInfo.pNormals = NULL; 139 this->pModelInfo.pTexCoor = NULL; 140 } 131 141 virtual ~AbstractModel() {} 132 142 133 inline const modelInfo* getModelInfo() const { return this->pModelInfo; }143 inline const modelInfo* getModelInfo() const { return &this->pModelInfo; } 134 144 135 145 136 146 protected: 137 modelInfo *pModelInfo; //!< Reference to the modelInfo147 modelInfo pModelInfo; //!< Reference to the modelInfo 138 148 }; 139 149 -
branches/collision_detection/src/lib/graphics/importer/model.cc
r5676 r5709 158 158 this->triangleCount = 0; 159 159 this->triangles = NULL; 160 this->pModelInfo = NULL;161 160 162 161 this->scaleFactor = 1; … … 208 207 delete tmpIt; 209 208 delete materialList; 210 delete this->pModelInfo;211 209 } 212 210 … … 226 224 227 225 /* load the ModelInfo */ 228 this->pModelInfo = new modelInfo; 229 this->pModelInfo->numVertices = this->vertexCount; 230 this->pModelInfo->pVertices = this->vertices->getArray(); 231 this->pModelInfo->numTriangles = this->triangleCount; 232 this->pModelInfo->pTriangles = this->triangles; 233 this->pModelInfo->numNormals = this->normalCount; 234 this->pModelInfo->pNormals = this->normals->getArray(); 235 this->pModelInfo->numTexCoor = this->vTexture->getCount(); 236 this->pModelInfo->pTexCoor = this->vTexture->getArray(); 226 this->pModelInfo.numVertices = this->vertexCount; 227 this->pModelInfo.pVertices = this->vertices->getArray(); 228 this->pModelInfo.numTriangles = this->triangleCount; 229 this->pModelInfo.pTriangles = this->triangles; 230 this->pModelInfo.numNormals = this->normalCount; 231 this->pModelInfo.pNormals = this->normals->getArray(); 232 this->pModelInfo.numTexCoor = this->vTexture->getCount(); 233 this->pModelInfo.pTexCoor = this->vTexture->getArray(); 237 234 238 235 this->finalized = true; … … 929 926 PRINTF(3)("got %i triangles, %i vertices\n", this->triangleCount, this->vertexCount); 930 927 931 928 932 929 /* write MODELINFO structure */ 933 930
Note: See TracChangeset
for help on using the changeset viewer.