Changeset 8119 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
- Timestamp:
- Jun 2, 2006, 12:16:09 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
r8074 r8119 1 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 4 4 Copyright (C) 2004 orx 5 5 6 7 8 9 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 10 11 11 ### File Specific: 12 12 main-programmer: hdavid, amaechler 13 13 */ 14 14 … … 31 31 SHELL_COMMAND(activate, RainEffect, activateRain); 32 32 SHELL_COMMAND(deactivate, RainEffect, deactivateRain); 33 34 SHELL_COMMAND(startRaining, RainEffect, startRaining); 33 35 34 36 using namespace std; … … 59 61 } 60 62 61 62 63 if(rainActivate) 64 this->activate(); 63 65 } 64 66 … … 84 86 LoadParam(root, "life", this, RainEffect, setRainLife); 85 87 LoadParam(root, "wind", this, RainEffect, setRainWind); 86 87 88 89 90 91 92 88 89 LOAD_PARAM_START_CYCLE(root, element); 90 { 91 LoadParam_CYCLE(element, "option", this, RainEffect, setRainOption); 92 } 93 LOAD_PARAM_END_CYCLE(element); 94 93 95 } 94 96 … … 97 99 { 98 100 //Default values 99 100 101 this->rainActivate = false; 102 this->rainMove = false; 101 103 this->rainCoord = Vector(500, 500, 500); 102 104 this->rainSize = Vector2D(1000, 1000); … … 108 110 109 111 this->emitter = new PlaneEmitter(this->rainSize); 110 111 112 113 lightMan = LightManager::getInstance(); 112 114 } 113 115 … … 145 147 if (this->rainWindForce > 0) 146 148 this->soundSource.loop(this->windBuffer, 0.5f); 147 148 149 150 lightMan->setAmbientColor(.1,.1,.1); 149 151 } 150 152 … … 156 158 157 159 this->soundSource.stop(); 158 159 160 161 lightMan->setAmbientColor(1,1,1); 160 162 } 161 163 … … 167 169 } 168 170 } 171 172 /** 173 * Slowly starts rain 174 * @param duration duration of the fade in process in seconds 175 */ 176 void RainEffect::startRaining(float duration) 177 { 178 // use alpha in color to fade in 179 // increase radius for more "heavy" rain 180 // increase sound volume 181 }
Note: See TracChangeset
for help on using the changeset viewer.