Changeset 8702 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h
- Timestamp:
- Jun 22, 2006, 11:12:05 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h
r8700 r8702 34 34 35 35 virtual void tick(float dt); 36 36 37 37 void coord(float x, float y, float z); 38 38 void setFlashSize(float width, float height, float seedWidth, float seedHeight); 39 39 40 40 inline void setLighteningOption(const std::string& option) { 41 41 if (option == "activate") this->lighteningActivate = true; … … 43 43 } 44 44 45 inline void setFlashFrequency(float mainFrequency, float seedTime) {46 this-> mainFrequency = mainFrequency;47 this->flashFrequency = mainFrequency;48 this-> seedTime= seedTime;45 inline void setFlashFrequency(float baseFrequency, float seedTime) { 46 this->flashFrequencyBase = baseFrequency; 47 this->flashFrequency = baseFrequency; 48 this->flashFrequencySeed = seedTime; 49 49 } 50 51 inline void setFlashConstTime(float flashConstTime) { this->flashConstTime = flashConstTime; }50 51 inline void setFlashConstTime(float holdTime) { this->flashHoldTime = holdTime; } 52 52 53 53 inline void setFlashRisingTime(float flashRisingTime) { 54 if(flashRisingTime > this->flash ConstTime)55 this->flashRisingTime = this->flash ConstTime/2;54 if(flashRisingTime > this->flashHoldTime) 55 this->flashRisingTime = this->flashHoldTime * 0.5; 56 56 else 57 57 this->flashRisingTime = flashRisingTime; 58 58 } 59 59 60 60 inline void setFlashSeed(float seedX, float seedZ) { 61 61 this->seedX = seedX; 62 62 this->seedZ = seedZ; 63 63 } 64 64 65 65 66 66 private: … … 68 68 bool lighteningActivate; 69 69 bool lighteningMove; 70 70 71 71 float flashFrequency; 72 float mainFrequency;73 float flash ConstTime;72 float flashFrequencyBase; 73 float flashHoldTime; 74 74 float flashRisingTime; 75 75 76 76 float time; 77 78 bool flashingActive;79 bool bNewCoordinate;80 77 81 78 float width; … … 83 80 float seedWidth; 84 81 float seedHeight; 85 82 86 83 float seedX; 87 84 float seedZ; 88 float seedTime;89 85 float flashFrequencySeed; 86 90 87 float mainPosX; 91 88 float mainPosY; 92 89 float mainPosZ; 93 90 91 void newCoordinates(); 92 94 93 Vector cameraCoor; 95 94 96 95 Light* flashLight; 97 96 98 97 OrxSound::SoundSource soundSource; 99 98 OrxSound::SoundBuffer* thunderBuffer;
Note: See TracChangeset
for help on using the changeset viewer.