Last change
on this file since 8493 was
8362,
checked in by bensch, 18 years ago
|
orxonox/trunk: removed stupid included in base_object.h
this should lead to faster compile-times
|
File size:
1.5 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 "vector2D.h" |
---|
14 | #include "plane.h" |
---|
15 | #include "glincl.h" |
---|
16 | |
---|
17 | |
---|
18 | #define LF_MAX_FLARES 7 |
---|
19 | |
---|
20 | |
---|
21 | class TiXmlElement; |
---|
22 | class Light; |
---|
23 | class ImagePlane; |
---|
24 | |
---|
25 | //! A class that handles LenseFlares. The LenseFlareManager operates on this. |
---|
26 | class LenseFlare : public GraphicsEffect |
---|
27 | { |
---|
28 | public: |
---|
29 | LenseFlare(const TiXmlElement* root = NULL); |
---|
30 | virtual ~LenseFlare(); |
---|
31 | |
---|
32 | virtual void loadParams(const TiXmlElement* root); |
---|
33 | |
---|
34 | virtual bool init(); |
---|
35 | |
---|
36 | virtual bool activate(); |
---|
37 | virtual bool deactivate(); |
---|
38 | |
---|
39 | virtual void draw() const; |
---|
40 | virtual void tick(float dt); |
---|
41 | |
---|
42 | void addFlare(const std::string& textureName); |
---|
43 | |
---|
44 | |
---|
45 | private: |
---|
46 | GLint stringToFogMode(const std::string& mode); |
---|
47 | void setSourceVisibility(bool visibility) ; |
---|
48 | |
---|
49 | |
---|
50 | private: |
---|
51 | bool bVisible; //!< Checks visibility |
---|
52 | Light* lightSource; //!< reference to the sun (or primary light source) |
---|
53 | std::vector<ImagePlane*> flares; //!< the flares array |
---|
54 | |
---|
55 | Vector2D flareVector; //!< the axis to draw the flares on |
---|
56 | float distance; //!< distance from center to source |
---|
57 | Vector2D screenCenter; //!< the vector marking the center of the screen |
---|
58 | |
---|
59 | float* flareMatrix; |
---|
60 | Plane frustumPlane; //!< plane that marks the view frustum |
---|
61 | }; |
---|
62 | |
---|
63 | |
---|
64 | #endif /* _LENSE_FLARE */ |
---|
Note: See
TracBrowser
for help on using the repository browser.