Changeset 6622 in orxonox.OLD for trunk/src/lib/graphics/importer
- Timestamp:
- Jan 20, 2006, 12:08:41 AM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r6467 r6622 68 68 ResourceManager::getInstance()->unload(this->specularTexture); 69 69 } 70 71 Material& Material::operator=(const Material& m) 72 { 73 this->setIllum(m.illumModel); 74 this->setDiffuse(m.diffuse[0],m.diffuse[1],m.diffuse[2]); 75 this->setAmbient(m.ambient[0],m.ambient[1],m.ambient[2]); 76 this->setSpecular(m.specular[0],m.specular[1],m.specular[2]); 77 this->setShininess(m.shininess); 78 this->setTransparency(m.transparency); 79 80 if (this->diffuseTexture != NULL) 81 ResourceManager::getInstance()->unload(this->diffuseTexture); 82 if (m.diffuseTexture != NULL) 83 this->diffuseTexture = m.diffuseTexture; /// HACK shoudl be:(Texture*)ResourceManager::getInstance()->load(); 84 this->ambientTexture = NULL; /// FIXME 85 this->specularTexture = NULL; /// FIXME 86 87 this->setName(m.getName()); 88 } 89 70 90 71 91 /** … … 282 302 //! @todo check if RESOURCE MANAGER is availiable 283 303 //! @todo Textures from .mtl-file need special care. 284 if (dMap != NULL)304 if (dMap != NULL) 285 305 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (void*)&target); 286 306 else -
trunk/src/lib/graphics/importer/material.h
r6467 r6622 28 28 virtual ~Material (); 29 29 30 Material& operator=(const Material& material); 31 30 32 bool select () const; 31 33 32 34 void setIllum (int illum); 33 35 void setIllum (char* illum); 36 int getIllumModel() const { return this->illumModel; }; 34 37 void setDiffuse (float r, float g, float b); 35 38 void setDiffuse (char* rgb); … … 58 61 float shininess; //!< The shininess of the Material. 59 62 float transparency; //!< The transperency of the Material. 60 public: 63 61 64 Texture* diffuseTexture; //!< The diffuse texture of the Material. 62 65 Texture* ambientTexture; //!< The ambient texture of the Material.
Note: See TracChangeset
for help on using the changeset viewer.