Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 14, 2006, 11:28:41 AM (19 years ago)
Author:
amaechler
Message:

branches/atmospheric_engine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h

    r8326 r8373  
    1313#include "sound_buffer.h"
    1414#include "sound_source.h"
    15 
    1615
    1716class Billboard;
     
    3130                virtual bool deactivate();
    3231
    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                                                                                          if (option == "movelightening") this->lighteningMove = true;}
    41     inline void setFlashFrequency(float mainFrequency, float seedTime) { this->mainFrequency = mainFrequency;
    42                                                                                                             this->flashFrequency = mainFrequency;
    43                                                                                                             this->seedTime = seedTime; }
    44     inline void setFlashConstTime(float flashConstTime) { this->flashConstTime = flashConstTime; }
    45     inline void setFlashRisingTime(float flashRisingTime) { if(flashRisingTime > this->flashConstTime)
    46                                                                                         this->flashRisingTime = this->flashConstTime/2;
    47                                                                                       else
    48                                                                                         this->flashRisingTime = flashRisingTime; }
    49     inline void setFlashSeed(float seedX, float seedZ) { this->seedX = seedX;
    50                                                                                   this->seedZ = seedZ; }
     32                inline void activateLightening() { this->activate(); }
     33                inline void deactivateLightening() { this->deactivate(); }
    5134
    52     void activateLightening() { this->activate(); }
    53     void deactivateLightening() { this->deactivate(); }
    54    
     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
    5567        private:
    56     Billboard* billboard[4];
    57     bool lighteningActivate;
    58     bool lighteningMove;
    59 
    60     float flashFrequency;
    61     float mainFrequency;
    62     float flashConstTime;
    63     float flashRisingTime;
    64 
    65     float time;
    66 
    67     bool  bNewCoordinate;
    68     float width;
    69     float height;
    70     float seedWidth;
    71     float seedHeight;
    72 
    73     float seedX;
    74     float seedZ;
    75     float seedTime;
    76    
    77     float mainPosX;
    78     float mainPosY;
    79     float mainPosZ;
    80    
    81     Vector cameraCoor;
    82 
    83     Light* flashLight;
    84    
    85     //OrxSound::SoundSource    soundSource;
    86     //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;
    8799
    88100};
Note: See TracChangeset for help on using the changeset viewer.