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