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