Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8713 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics


Ignore:
Timestamp:
Jun 22, 2006, 1:11:41 PM (18 years ago)
Author:
hdavid
Message:

branches/atmospheric_engine

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

Legend:

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

    r8700 r8713  
    6464  this->offsetZ = 0;
    6565  this->animationSpeed = 2;
    66   this->lightPos = Vector(0,0,0);
    67   this->scale = 0.0008f;
     66  this->scale = 0.0004f;
    6867  this->atmosphericRadius = 4000;
    6968  this->planetRadius = 1500;
     
    108107
    109108  LoadParam(root, "speed", this, CloudEffect, setAnimationSpeed);
    110   LoadParam(root, "lightPos", this, CloudEffect, setLightPosition);
    111109  LoadParam(root, "scale", this, CloudEffect, setCloudScale);
    112110 
     
    130128  this->shader->activateShader();
    131129  Shader::Uniform(shader, "Scale").set(this->scale);
    132   Shader::Uniform(shader, "LightPos").set(lightPos.x, lightPos.y, lightPos.z);
    133130  this->shader->deactivateShader();
    134131 
     
    157154  glEnable(GL_TEXTURE_3D);
    158155  glBindTexture(GL_TEXTURE_3D, noise3DTexName);
    159 
    160   //glPushMatrix();
    161156
    162157  this->shader->activateShader();
     
    177172  glTranslatef(0.0f,pRadius,0.0f);
    178173  //glRotatef(timeGetTime()/2000.0f,0.0f, 1.0f, 0.0f);
    179   //glTranslatef(0.0f,0.0f,0.0f);
    180174
    181175  glBegin(GL_TRIANGLES);
     
    195189  this->shader->deactivateShader();
    196190
    197   //glPopMatrix();
    198191  glPopAttrib();
    199192
     
    202195void CloudEffect::tick (float dt)
    203196{
    204   if (!this->cloudActivate)
    205     return;
    206   this->offsetZ += 0.05 * dt * this->animationSpeed;
     197  if (this->cloudActivate)
     198    this->offsetZ += 0.05 * dt * this->animationSpeed;
    207199}
    208200
  • branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h

    r8668 r8713  
    6969  inline void setAnimationSpeed(float speed)
    7070  { this->animationSpeed = speed; }
    71  
    72   inline void setLightPosition(float x, float y, float z)
    73   { this->lightPos = Vector(x,y,z); }
    7471
    7572  inline void setCloudScale(float scale)
     
    108105  Shader::Uniform* offset;
    109106  float            offsetZ;
    110   Vector           lightPos;
    111107  float            scale;
    112108  float            planetRadius;
  • branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc

    r8702 r8713  
    7878  this->lighteningActivate = false;
    7979
    80   this->flashFrequencyBase = 2.0f;
    81   this->flashFrequencySeed = 4.0f;
     80  this->flashFrequency = 4.0f;
     81  this->flashFrequencyBase = 4.0f;
     82  this->flashFrequencySeed = 2.0f;
    8283
    8384  this->flashHoldTime = 0.1f;
     
    9495  this->lighteningMove = false;
    9596
    96   this->mainPosX = 2000;
     97  this->mainPosX = 1200;
    9798  this->mainPosY = 900;
    9899  this->mainPosZ = 0;
     
    124125  {
    125126    this->cameraCoor = State::getCameraNode()->getAbsCoor();
    126     this->billboard[0]->setAbsCoor(this->cameraCoor.x+3000,900,this->cameraCoor.z+0);
    127     this->billboard[1]->setAbsCoor(this->cameraCoor.x+3000,900,this->cameraCoor.z+0);
    128     this->billboard[2]->setAbsCoor(this->cameraCoor.x+3000,900,this->cameraCoor.z+0);
    129     this->billboard[3]->setAbsCoor(this->cameraCoor.x+3000,900,this->cameraCoor.z+0);
     127    this->billboard[0]->setAbsCoor(this->cameraCoor.x+1200,900,this->cameraCoor.z+0);
     128    this->billboard[1]->setAbsCoor(this->cameraCoor.x+1200,900,this->cameraCoor.z+0);
     129    this->billboard[2]->setAbsCoor(this->cameraCoor.x+1200,900,this->cameraCoor.z+0);
     130    this->billboard[3]->setAbsCoor(this->cameraCoor.x+1200,900,this->cameraCoor.z+0);
    130131  }
    131132  else
    132133  {
    133     this->billboard[0]->setAbsCoor(3000,900,0);
    134     this->billboard[1]->setAbsCoor(3000,900,0);
    135     this->billboard[2]->setAbsCoor(3000,900,0);
    136     this->billboard[3]->setAbsCoor(3000,900,0);
     134    this->billboard[0]->setAbsCoor(1200,900,0);
     135    this->billboard[1]->setAbsCoor(1200,900,0);
     136    this->billboard[2]->setAbsCoor(1200,900,0);
     137    this->billboard[3]->setAbsCoor(1200,900,0);
    137138  }
    138139
Note: See TracChangeset for help on using the changeset viewer.