Changeset 8903 in orxonox.OLD for branches/mountain_lake/src/lib
- Timestamp:
- Jun 29, 2006, 1:37:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mountain_lake/src/lib/graphics/effects/cloud_effect.cc
r8902 r8903 75 75 { 76 76 PRINTF(0)("Initializing CloudEffect\n"); 77 77 78 78 this->offsetZ = 0; 79 79 this->animationSpeed = 2; … … 183 183 this->shader->activateShader(); 184 184 this->offset->set(0.0f, 0.0f, offsetZ); 185 185 186 186 if(cloudColor != newCloudColor) 187 187 { 188 188 if(fadeCloud) 189 { 189 { 190 190 this->cloudColorFadeX = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudX); 191 191 this->cloudColorFadeX->setInfinity(ANIM_INF_CONSTANT); … … 194 194 this->cloudColorFadeZ = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudZ); 195 195 this->cloudColorFadeZ->setInfinity(ANIM_INF_CONSTANT); 196 196 197 197 this->cloudColorFadeX->addKeyFrame(cloudColor.x, fadeTime, ANIM_LINEAR); 198 198 this->cloudColorFadeX->addKeyFrame(newCloudColor.x, 0, ANIM_LINEAR); 199 199 200 200 this->cloudColorFadeY->addKeyFrame(cloudColor.y, fadeTime, ANIM_LINEAR); 201 201 this->cloudColorFadeY->addKeyFrame(newCloudColor.y, 0, ANIM_LINEAR); 202 202 203 203 this->cloudColorFadeZ->addKeyFrame(cloudColor.z, fadeTime, ANIM_LINEAR); 204 204 this->cloudColorFadeZ->addKeyFrame(newCloudColor.z, 0, ANIM_LINEAR); 205 205 206 206 fadeCloud = false; 207 207 208 208 this->cloudColorFadeX->replay(); 209 209 this->cloudColorFadeY->replay(); 210 210 this->cloudColorFadeZ->replay(); 211 211 } 212 212 213 213 this->cloudcolor->set(this->cloudColor.x, this->cloudColor.y, this->cloudColor.z); 214 214 } 215 215 216 216 if(skyColor != newSkyColor) 217 { 217 { 218 218 if(fadeSky) 219 { 219 { 220 220 this->skyColorFadeX = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyX); 221 221 this->skyColorFadeX->setInfinity(ANIM_INF_CONSTANT); … … 224 224 this->skyColorFadeZ = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyZ); 225 225 this->skyColorFadeZ->setInfinity(ANIM_INF_CONSTANT); 226 226 227 227 this->skyColorFadeX->addKeyFrame(skyColor.x, fadeTime, ANIM_LINEAR); 228 228 this->skyColorFadeX->addKeyFrame(newSkyColor.x, 0, ANIM_LINEAR); 229 229 230 230 this->skyColorFadeY->addKeyFrame(skyColor.y, fadeTime, ANIM_LINEAR); 231 231 this->skyColorFadeY->addKeyFrame(newSkyColor.y, 0, ANIM_LINEAR); 232 232 233 233 this->skyColorFadeZ->addKeyFrame(skyColor.z, fadeTime, ANIM_LINEAR); 234 234 this->skyColorFadeZ->addKeyFrame(newSkyColor.z, 0, ANIM_LINEAR); 235 235 236 236 fadeSky = false; 237 237 238 238 this->skyColorFadeX->replay(); 239 239 this->skyColorFadeY->replay(); 240 240 this->skyColorFadeZ->replay(); 241 241 } 242 242 243 243 this->skycolor->set(this->skyColor.x, this->skyColor.y, this->skyColor.z); 244 244 } 245 245 246 246 this->shader->deactivateShader(); 247 247 }
Note: See TracChangeset
for help on using the changeset viewer.