Changeset 8713 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects
- Timestamp:
- Jun 22, 2006, 1:11:41 PM (18 years ago)
- 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 64 64 this->offsetZ = 0; 65 65 this->animationSpeed = 2; 66 this->lightPos = Vector(0,0,0); 67 this->scale = 0.0008f; 66 this->scale = 0.0004f; 68 67 this->atmosphericRadius = 4000; 69 68 this->planetRadius = 1500; … … 108 107 109 108 LoadParam(root, "speed", this, CloudEffect, setAnimationSpeed); 110 LoadParam(root, "lightPos", this, CloudEffect, setLightPosition);111 109 LoadParam(root, "scale", this, CloudEffect, setCloudScale); 112 110 … … 130 128 this->shader->activateShader(); 131 129 Shader::Uniform(shader, "Scale").set(this->scale); 132 Shader::Uniform(shader, "LightPos").set(lightPos.x, lightPos.y, lightPos.z);133 130 this->shader->deactivateShader(); 134 131 … … 157 154 glEnable(GL_TEXTURE_3D); 158 155 glBindTexture(GL_TEXTURE_3D, noise3DTexName); 159 160 //glPushMatrix();161 156 162 157 this->shader->activateShader(); … … 177 172 glTranslatef(0.0f,pRadius,0.0f); 178 173 //glRotatef(timeGetTime()/2000.0f,0.0f, 1.0f, 0.0f); 179 //glTranslatef(0.0f,0.0f,0.0f);180 174 181 175 glBegin(GL_TRIANGLES); … … 195 189 this->shader->deactivateShader(); 196 190 197 //glPopMatrix();198 191 glPopAttrib(); 199 192 … … 202 195 void CloudEffect::tick (float dt) 203 196 { 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; 207 199 } 208 200 -
branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h
r8668 r8713 69 69 inline void setAnimationSpeed(float speed) 70 70 { this->animationSpeed = speed; } 71 72 inline void setLightPosition(float x, float y, float z)73 { this->lightPos = Vector(x,y,z); }74 71 75 72 inline void setCloudScale(float scale) … … 108 105 Shader::Uniform* offset; 109 106 float offsetZ; 110 Vector lightPos;111 107 float scale; 112 108 float planetRadius; -
branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc
r8702 r8713 78 78 this->lighteningActivate = false; 79 79 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; 82 83 83 84 this->flashHoldTime = 0.1f; … … 94 95 this->lighteningMove = false; 95 96 96 this->mainPosX = 2000;97 this->mainPosX = 1200; 97 98 this->mainPosY = 900; 98 99 this->mainPosZ = 0; … … 124 125 { 125 126 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); 130 131 } 131 132 else 132 133 { 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); 137 138 } 138 139
Note: See TracChangeset
for help on using the changeset viewer.