source:
orxonox.OLD/trunk/src/world_entities/elements/glgui_radar.h
@
8992
Last change on this file since 8992 was 8992, checked in by bensch, 18 years ago | |
---|---|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[8991] | 2 | * @file glgui_radar.h |
3 | * @brief Definition of an Radar, that displays a bar and a Text | |
[3245] | 4 | */ |
[1853] | 5 | |
[8991] | 6 | #ifndef _GLGUI_RADAR_H |
7 | #define _GLGUI_RADAR_H | |
[1853] | 8 | |
[8991] | 9 | #include "glgui_widget.h" |
[1853] | 10 | |
[8991] | 11 | class WorldEntity; |
12 | ||
[8972] | 13 | namespace OrxGui |
14 | { | |
[3543] | 15 | |
[8972] | 16 | //! A class for ... |
[8991] | 17 | class GLGuiRadar : public GLGuiWidget |
[8972] | 18 | { |
[8992] | 19 | public: |
20 | typedef enum { | |
21 | Linear, | |
22 | Exponential, | |
23 | } Attenuation; | |
[3543] | 24 | |
[8973] | 25 | public: |
[8991] | 26 | GLGuiRadar(); |
27 | virtual ~GLGuiRadar(); | |
[2036] | 28 | |
[8991] | 29 | void setRange(float range); |
[8992] | 30 | |
31 | void setUpdateInterval(float updateInterval) { this->_updateInterval = updateInterval; }; | |
32 | void setAttenuation(Attenuation attenuation); | |
33 | ||
[8991] | 34 | float range() const { return this->_range; } |
[8974] | 35 | |
[8992] | 36 | |
37 | void tick(float dt); | |
38 | void draw() const; | |
39 | ||
[8973] | 40 | protected: |
[8981] | 41 | virtual void resize(); |
[8975] | 42 | virtual void showing(); |
43 | virtual void hiding(); | |
[1853] | 44 | |
[8973] | 45 | private: |
[8991] | 46 | typedef struct |
47 | { | |
[8992] | 48 | Color dotColor; |
49 | const std::list<WorldEntity*>& entityList; | |
50 | std::vector<Vector2D> position; | |
51 | } | |
52 | DotList; | |
[1853] | 53 | |
[8991] | 54 | std::vector<DotList> _dotLists; |
55 | ||
[8992] | 56 | Attenuation _attenuation; |
[8991] | 57 | float _range; |
58 | ||
[8992] | 59 | |
60 | float _updateInterval; | |
61 | float _timePassed; | |
[8972] | 62 | }; |
63 | } | |
[8991] | 64 | #endif /* _GLGUI_RADAR_H */ |
Note: See TracBrowser
for help on using the repository browser.