Changeset 5308 in orxonox.OLD for trunk/src/lib/graphics/importer/material.cc
- Timestamp:
- Oct 8, 2005, 12:32:52 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r5306 r5308 57 57 Material::~Material() 58 58 { 59 PRINTF( 4)("delete Material %s.\n", this->getName());59 PRINTF(5)("delete Material %s.\n", this->getName()); 60 60 61 61 if (this->diffuseTexture != NULL) 62 { 62 63 ResourceManager::getInstance()->unload(this->diffuseTexture); 64 } 63 65 if (this->ambientTexture != NULL) 64 66 ResourceManager::getInstance()->unload(this->ambientTexture); … … 69 71 /** 70 72 * sets the material with which the following Faces will be painted 71 */72 bool Material::select () 73 */ 74 bool Material::select () const 73 75 { 74 76 // setting diffuse color … … 127 129 * Sets the Material Illumination Model. 128 130 * illu illumination Model in int form 129 */131 */ 130 132 void Material::setIllum (int illum) 131 133 { … … 133 135 this->illumModel = illum; 134 136 } 137 135 138 /** 136 139 * Sets the Material Illumination Model. 137 140 * illu illumination Model in char* form 138 */void Material::setIllum (char* illum) 141 */ 142 void Material::setIllum (char* illum) 139 143 { 140 144 this->setIllum (atoi(illum)); … … 146 150 * @param g Green Color Channel. 147 151 * @param b Blue Color Channel. 148 */152 */ 149 153 void Material::setDiffuse (float r, float g, float b) 150 154 { … … 156 160 157 161 } 162 158 163 /** 159 164 * Sets the Material Diffuse Color. 160 165 * @param rgb The red, green, blue channel in char format (with spaces between them) 161 */166 */ 162 167 void Material::setDiffuse (char* rgb) 163 168 { … … 181 186 this->ambient[3] = 1.0; 182 187 } 188 183 189 /** 184 190 * Sets the Material Ambient Color. 185 191 * @param rgb The red, green, blue channel in char format (with spaces between them) 186 */192 */ 187 193 void Material::setAmbient (char* rgb) 188 194 { … … 197 203 * @param g Green Color Channel. 198 204 * @param b Blue Color Channel. 199 */205 */ 200 206 void Material::setSpecular (float r, float g, float b) 201 207 { … … 206 212 this->specular[3] = 1.0; 207 213 } 214 208 215 /** 209 216 * Sets the Material Specular Color. … … 269 276 void Material::setDiffuseMap(const char* dMap) 270 277 { 271 PRINTF( 4)("setting Diffuse Map %s\n", dMap);278 PRINTF(5)("setting Diffuse Map %s\n", dMap); 272 279 if (this->diffuseTexture != NULL) 273 280 ResourceManager::getInstance()->unload(this->diffuseTexture);
Note: See TracChangeset
for help on using the changeset viewer.