Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 22, 2006, 11:12:05 AM (18 years ago)
Author:
amaechler
Message:

branches/atmospheric_engine: cleanup

File:
1 edited

Legend:

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

    r8700 r8702  
    3434
    3535                virtual void tick(float dt);
    36                
     36
    3737                void coord(float x, float y, float z);
    3838                void setFlashSize(float width, float height, float seedWidth, float seedHeight);
    39                
     39
    4040                inline void setLighteningOption(const std::string& option) {
    4141                        if (option == "activate") this->lighteningActivate = true;
     
    4343                }
    4444
    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;
    4949                }
    50                
    51                 inline void setFlashConstTime(float flashConstTime) { this->flashConstTime = flashConstTime; }
     50
     51                inline void setFlashConstTime(float holdTime) { this->flashHoldTime = holdTime; }
    5252
    5353                inline void setFlashRisingTime(float flashRisingTime) {
    54                         if(flashRisingTime > this->flashConstTime)
    55                                 this->flashRisingTime = this->flashConstTime/2;
     54                        if(flashRisingTime > this->flashHoldTime)
     55                                this->flashRisingTime = this->flashHoldTime * 0.5;
    5656                        else
    5757                                this->flashRisingTime = flashRisingTime;
    5858                }
    59                
     59
    6060                inline void setFlashSeed(float seedX, float seedZ) {
    6161                        this->seedX = seedX;
    6262                        this->seedZ = seedZ;
    6363                }
    64                
     64
    6565
    6666        private:
     
    6868                bool lighteningActivate;
    6969                bool lighteningMove;
    70                
     70
    7171                float flashFrequency;
    72                 float mainFrequency;
    73                 float flashConstTime;
     72                float flashFrequencyBase;
     73                float flashHoldTime;
    7474                float flashRisingTime;
    75                
     75
    7676                float time;
    77                
    78     bool  flashingActive;
    79     bool bNewCoordinate;
    8077
    8178                float width;
     
    8380                float seedWidth;
    8481                float seedHeight;
    85                
     82
    8683                float seedX;
    8784                float seedZ;
    88                 float seedTime;
    89                
     85                float flashFrequencySeed;
     86
    9087                float mainPosX;
    9188                float mainPosY;
    9289                float mainPosZ;
    93                
     90
     91    void newCoordinates();
     92
    9493                Vector cameraCoor;
    95                
     94
    9695                Light* flashLight;
    97                
     96
    9897                OrxSound::SoundSource    soundSource;
    9998                OrxSound::SoundBuffer*   thunderBuffer;
Note: See TracChangeset for help on using the changeset viewer.