Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/graphics/effects/lense_flare.h @ 6815

Last change on this file since 6815 was 6815, checked in by bensch, 18 years ago

orxonox/trunk: merged branches/network back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/network . -r6774:HEAD

no conflicts…
thats what i call orthogonal work

File size: 1.3 KB
Line 
1/**
2 * @file lense_flare.h
3 *  lense flare effect
4 */
5
6#ifndef _LENSE_FLARE
7#define _LENSE_FLARE
8
9#include "graphics_effect.h"
10
11#include <vector>
12
13#include "vector.h"
14
15
16#define LF_MAX_FLARES 7
17
18
19class TiXmlElement;
20class Light;
21class Billboard;
22
23//! A class that handles LenseFlares. The LenseFlareManager operates on this.
24class LenseFlare : public GraphicsEffect
25{
26  public:
27    LenseFlare(const TiXmlElement* root = NULL);
28    virtual ~LenseFlare();
29
30    virtual void loadParams(const TiXmlElement* root);
31
32    virtual bool init();
33
34    virtual bool activate();
35    virtual bool deactivate();
36
37    virtual void draw() const;
38    virtual void tick(float dt);
39
40    void addFlare(const char* textureName);
41
42
43  private:
44    GLint charToFogMode(const char* mode);
45
46
47  private:
48    Light*                   lightSource;        //!< reference to the sun (or primary light source)
49    std::vector<Billboard*>  flares;             //!< the flares array
50
51    Vector                   flareVector;        //!< the axis to draw the flares on
52    float                    distance;           //!< distance from center to source
53    Vector                   screenCenter;       //!< the vector marking the center of the screen
54
55    float*                   flareMatrix;
56};
57
58
59#endif /* _LENSE_FLARE */
Note: See TracBrowser for help on using the repository browser.