Changeset 2842 in orxonox.OLD for orxonox/trunk/importer/material.cc
- Timestamp:
- Nov 12, 2004, 6:51:15 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/importer/material.cc
r2837 r2842 16 16 #include "material.h" 17 17 18 /** 19 \brief creates a default Material with no Name 20 normally you call this to create a material List (for an obj-file) and then append with addMaterial() 21 */ 18 22 Material::Material() 19 23 { … … 23 27 } 24 28 29 /** 30 \brief creates a Material. 31 \param mtlName Name of the Material to be added to the Material List 32 */ 25 33 Material::Material (char* mtlName) 26 34 { … … 30 38 } 31 39 40 /** 41 \brief adds a new Material to the List. 42 this Function will append a new Material to the end of a Material List. 43 \param mtlName The name of the Material to be added. 44 */ 32 45 Material* Material::addMaterial(char* mtlName) 33 46 { … … 45 58 } 46 59 60 /** 61 \brief initializes a new Material with its default Values 62 */ 47 63 void Material::init(void) 48 64 { … … 60 76 } 61 77 62 78 /** 79 \brief Set the Name of the Material. (Important for searching) 80 \param mtlName the Name of the Material to be set. 81 */ 63 82 void Material::setName (char* mtlName) 64 83 { … … 69 88 70 89 } 90 /** 91 \returns The Name of The Material 92 */ 71 93 char* Material::getName (void) 72 94 { … … 74 96 } 75 97 76 98 /** 99 \brief Sets the Material Illumination Model. 100 \brief illu illumination Model in int form 101 */ 77 102 void Material::setIllum (int illum) 78 103 { … … 82 107 // printf ("setting illumModel to: %i\n", illumModel); 83 108 } 84 void Material::setIllum (char* illum) 109 /** 110 \brief Sets the Material Illumination Model. 111 \brief illu illumination Model in char* form 112 */void Material::setIllum (char* illum) 85 113 { 86 114 setIllum (atoi(illum)); 87 115 } 88 116 117 /** 118 \brief Sets the Material Diffuse Color. 119 \param r Red Color Channel. 120 \param g Green Color Channel. 121 \param b Blue Color Channel. 122 */ 89 123 void Material::setDiffuse (float r, float g, float b) 90 124 { … … 97 131 98 132 } 133 /** 134 \brief Sets the Material Diffuse Color. 135 \param rgb The red, green, blue channel in char format (with spaces between them) 136 */ 99 137 void Material::setDiffuse (char* rgb) 100 138 { … … 104 142 } 105 143 144 /** 145 \brief Sets the Material Ambient Color. 146 \param r Red Color Channel. 147 \param g Green Color Channel. 148 \param b Blue Color Channel. 149 */ 106 150 void Material::setAmbient (float r, float g, float b) 107 151 { … … 113 157 ambient[3] = 1.0; 114 158 } 159 /** 160 \brief Sets the Material Ambient Color. 161 \param rgb The red, green, blue channel in char format (with spaces between them) 162 */ 115 163 void Material::setAmbient (char* rgb) 116 164 { … … 120 168 } 121 169 170 /** 171 \brief Sets the Material Specular Color. 172 \param r Red Color Channel. 173 \param g Green Color Channel. 174 \param b Blue Color Channel. 175 */ 122 176 void Material::setSpecular (float r, float g, float b) 123 177 { … … 129 183 specular[3] = 1.0; 130 184 } 185 /** 186 \brief Sets the Material Specular Color. 187 \param rgb The red, green, blue channel in char format (with spaces between them) 188 */ 131 189 void Material::setSpecular (char* rgb) 132 190 { … … 136 194 } 137 195 196 /** 197 \brief Sets the Material Shininess. 198 \param shini stes the Shininess from float. 199 */ 138 200 void Material::setShininess (float shini) 139 201 { 140 202 shininess = shini; 141 203 } 204 /** 205 \brief Sets the Material Shininess. 206 \param shini stes the Shininess from char*. 207 */ 142 208 void Material::setShininess (char* shini) 143 209 { … … 145 211 } 146 212 213 /** 214 \brief Sets the Material Transparency. 215 \param trans stes the Transparency from int. 216 */ 147 217 void Material::setTransparency (float trans) 148 218 { … … 151 221 transparency = trans; 152 222 } 223 /** 224 \brief Sets the Material Transparency. 225 \param trans stes the Transparency from char*. 226 */ 153 227 void Material::setTransparency (char* trans) 154 228 { … … 158 232 } 159 233 160 234 /** 235 \brief Search for a Material called mtlName 236 \param mtlName the Name of the Material to search for 237 \returns Material named mtlName if it is found. NULL otherwise. 238 */ 161 239 Material* Material::search (char* mtlName) 162 240 { … … 179 257 } 180 258 259 /** 260 \brief sets the material with which the following Faces will be painted 261 */ 181 262 bool Material::select (void) 182 263 {
Note: See TracChangeset
for help on using the changeset viewer.