Changeset 6888 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Jan 31, 2006, 4:38:57 AM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/effects/lense_flare.cc
r6887 r6888 54 54 this->flareMatrix[6] = 0.125f; this->flareMatrix[7] = 1.0f; 55 55 this->flareMatrix[8] = -0.5f; this->flareMatrix[9] = 0.5f; 56 this->flareMatrix[10] = -0.25f; this->flareMatrix[11] = 0. 25f;57 this->flareMatrix[12] = 1.82f; this->flareMatrix[13] = 0.25f;56 this->flareMatrix[10] = -0.25f; this->flareMatrix[11] = 0.15f; 57 this->flareMatrix[12] = -1.82f; this->flareMatrix[13] = 0.25f; 58 58 59 59 this->lightSource = (LightManager::getInstance())->getLight(0); … … 178 178 this->screenCenter = Vector(State::getResX()/2.0f, State::getResY()/2.0f, 0.0f); 179 179 // flare vector is the direction from the center to the light source 180 this->flareVector = this->screenCenter - this->flares[0]->getAbsCoor2D(); 180 this->flareVector = this->flares[0]->getAbsCoor2D() - this->screenCenter; 181 this->flareVector.z = 0.0f; 181 182 this->distance = this->flareVector.len(); 182 183 this->flareVector.normalize(); … … 190 191 if( i == 0) 191 192 continue; 193 PRINTF(0)("calculus: (%f %f %f) * %f * %f\n", this->flareVector.x, this->flareVector.y, this->flareVector.z, this->flareMatrix[i * 2], this->distance); 192 194 (*it)->setAbsCoor2D( this->screenCenter + this->flareVector * this->flareMatrix[i * 2] * this->distance); 195 (*it)->setSize2D(50.0f * this->flareMatrix[i * 2 + 1], 50.0f * this->flareMatrix[i * 2 + 1]); 193 196 PRINTF(5)("Tick flare %i @ (%f, %f)\n", i, (*it)->getAbsCoor2D().x, (*it)->getAbsCoor2D().y); 194 197 // tick them -
trunk/src/lib/graphics/graphics_engine.cc
r6885 r6888 176 176 this->loadGraphicsEffect(ge); 177 177 178 ge->addFlare("pictures/lense_flare/lens1.png"); //sun 179 ge->addFlare("pictures/lense_flare/lens2.png"); //first halo 180 ge->addFlare("pictures/lense_flare/lens1.png"); //small birst 181 ge->addFlare("pictures/lense_flare/lens3.png"); //second halo 182 ge->addFlare("pictures/lense_flare/lens4.png"); 178 183 ge->addFlare("pictures/lense_flare/lens1.png"); 179 ge->addFlare("pictures/lense_flare/lens2.png");180 184 ge->addFlare("pictures/lense_flare/lens3.png"); 181 ge->addFlare("pictures/lense_flare/lens4.png");182 185 183 186 ge->activate();
Note: See TracChangeset
for help on using the changeset viewer.