Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8266 in orxonox.OLD for branches/atmospheric_engine/src/lib


Ignore:
Timestamp:
Jun 8, 2006, 4:26:40 PM (18 years ago)
Author:
hdavid
Message:

branches/atmospheric_engine: cool light effect for the lightening

Location:
branches/atmospheric_engine/src/lib/graphics/effects
Files:
2 edited

Legend:

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

    r8255 r8266  
    7171  this->time = 0.0;
    7272  this->flashFrequency = 1.4f;
     73  this->mainFrequency = 1.4f;
    7374  this->flashConstTime = 0.5f;
    7475  this->flashRisingTime = 0.1f;
     
    105106  this->billboard[3]->setTexture("maps/lightning_bolt4.png");
    106107  this->billboard[3]->setSize(this->width, this->height);
    107   this->billboard[3]->setAbsCoor(0.0f, 50.0f, 0.0f);
     108  this->billboard[3]->setAbsCoor(3000,850,0);
    108109  this->billboard[3]->setVisibiliy(false);
    109110/*
     
    230231    this->billboard[2]->setAbsCoor(posX, this->mainPosY, posZ);
    231232    this->billboard[3]->setAbsCoor(posX, this->mainPosY, posZ);
     233    this->flashFrequency = this->mainFrequency + this->seedTime * (float)rand()/(float)RAND_MAX;
     234   
    232235    this->bNewCoordinate = false;
    233236  }
  • branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h

    r8255 r8266  
    3838   
    3939    inline void setLighteningOption(const std::string& option) { if (option == "activate") this->lighteningActivate = true;}
    40     inline void setFlashFrequency(float flashFrequency) { this->flashFrequency = flashFrequency; }
     40    inline void setFlashFrequency(float mainFrequency) { this->mainFrequency = mainFrequency;
     41                                                                                     this->flashFrequency = mainFrequency; }
    4142    inline void setFlashConstTime(float flashConstTime) { this->flashConstTime = flashConstTime; }
    4243    inline void setFlashRisingTime(float flashRisingTime) { if(flashRisingTime > this->flashConstTime)
     
    5657
    5758    float flashFrequency;
     59    float mainFrequency;
    5860    float flashConstTime;
    5961    float flashRisingTime;
Note: See TracChangeset for help on using the changeset viewer.