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 | |
---|
14 | class TiXmlElement; |
---|
15 | class Light; |
---|
16 | class Billboard; |
---|
17 | |
---|
18 | //! A class that handles LenseFlares. The LenseFlareManager operates on this. |
---|
19 | class LenseFlare : public GraphicsEffect |
---|
20 | { |
---|
21 | public: |
---|
22 | LenseFlare(const TiXmlElement* root = NULL); |
---|
23 | virtual ~LenseFlare(); |
---|
24 | |
---|
25 | virtual void loadParams(const TiXmlElement* root); |
---|
26 | |
---|
27 | virtual bool init(); |
---|
28 | |
---|
29 | virtual bool activate(); |
---|
30 | virtual bool deactivate(); |
---|
31 | |
---|
32 | virtual void draw() const; |
---|
33 | virtual void tick(float dt); |
---|
34 | |
---|
35 | void addFlare(const char* textureName); |
---|
36 | |
---|
37 | |
---|
38 | private: |
---|
39 | GLint charToFogMode(const char* mode); |
---|
40 | |
---|
41 | |
---|
42 | private: |
---|
43 | Light* lightSource; //!< reference to the sun (or primary light source) |
---|
44 | std::vector<Billboard*> flares; //!< the flares array |
---|
45 | |
---|
46 | Vector* flareVector; //!< the axis to draw the flares on |
---|
47 | Vector* screenCenter; //!< the vector marking the center of the screen |
---|
48 | }; |
---|
49 | |
---|
50 | |
---|
51 | #endif /* _LENSE_FLARE */ |
---|
Note: See
TracBrowser
for help on using the repository browser.