Changeset 7123 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Feb 11, 2006, 8:57:26 PM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/md2Model.cc
r7114 r7123 77 77 MD2Model::MD2Model(const char* modelFileName, const char* skinFileName, float scale) 78 78 { 79 this->setClassID(CL_MD2_MODEL, "MD2Model"); 79 80 /* this creates the data container via ressource manager */ 80 81 this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName, scale); … … 222 223 glCullFace(GL_BACK); 223 224 224 this->data->material ->select();225 this->data->material.select(); 225 226 226 227 /* draw the triangles */ … … 263 264 // this->processLighting(); 264 265 // this->interpolate(/*this->verticesList*/); 265 this->data->material ->select();266 this->data->material.select(); 266 267 267 268 /* draw the triangles */ … … 409 410 delete [] this->pTexCoor; 410 411 411 delete this->material;412 412 } 413 413 … … 518 518 strcpy(this->skinFileName, fileName); 519 519 520 this->material = new Material("md2ModelTest");521 this->material ->setDiffuseMap(fileName);522 this->material ->setIllum(3);523 this->material ->setAmbient(1.0, 1.0, 1.0);524 } 520 this->material.setName("md2ModelMaterial"); 521 this->material.setDiffuseMap(fileName); 522 this->material.setIllum(3); 523 this->material.setAmbient(1.0, 1.0, 1.0); 524 } -
trunk/src/lib/graphics/importer/md2Model.h
r7114 r7123 19 19 #define _MD2MODEL_H 20 20 21 #include "base_object.h" 22 21 23 #include "model.h" 22 #include "base_object.h" 23 #include "stdincl.h" 24 24 #include "material.h" 25 25 26 26 //! These are the needed defines for the max values when loading .MD2 files … … 212 212 int* pLightNormals; //!< pointer to the light normals 213 213 214 Material *material; //!< pointer to the material214 Material material; //!< pointer to the material 215 215 float scaleFactor; //!< the scale factor of the model, (global) 216 216 }; -
trunk/src/lib/graphics/importer/model.h
r6308 r7123 58 58 59 59 public: 60 Model();61 60 virtual ~Model(); 62 61 … … 85 84 inline unsigned int getTriangleCount() const { return this->pModelInfo.numTriangles; }; 86 85 86 protected: 87 Model(); 88 87 89 88 90 protected:
Note: See TracChangeset
for help on using the changeset viewer.