Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7316 in orxonox.OLD for trunk/src/lib/graphics/effects


Ignore:
Timestamp:
Apr 17, 2006, 1:49:05 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: Element2D uses Vector2D instead of Vector whenever possible

Location:
trunk/src/lib/graphics/effects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/effects/lense_flare.cc

    r7221 r7316  
    212212
    213213  // always update the screen center, it could be, that the window is resized
    214   this->screenCenter = Vector(State::getResX()/2.0f, State::getResY()/2.0f, 0.0f);
     214  this->screenCenter = Vector2D(State::getResX()/2.0f, State::getResY()/2.0f);
    215215
    216216  // flare vector is the direction from the center to the light source
    217217  this->flareVector = this->flares[0]->getAbsCoor2D() - this->screenCenter;
    218   this->flareVector.z = 0.0f;
    219218  this->distance = this->flareVector.len();
    220219  this->flareVector.normalize();
  • trunk/src/lib/graphics/effects/lense_flare.h

    r7221 r7316  
    1111#include <vector>
    1212
    13 #include "vector.h"
     13#include "vector2D.h"
    1414#include "plane.h"
    1515
     
    5252    std::vector<Billboard*>  flares;             //!< the flares array
    5353
    54     Vector                   flareVector;        //!< the axis to draw the flares on
     54    Vector2D                 flareVector;        //!< the axis to draw the flares on
    5555    float                    distance;           //!< distance from center to source
    56     Vector                   screenCenter;       //!< the vector marking the center of the screen
     56    Vector2D                 screenCenter;       //!< the vector marking the center of the screen
    5757
    5858    float*                   flareMatrix;
Note: See TracChangeset for help on using the changeset viewer.