Last change
on this file since 4814 was
4781,
checked in by bensch, 20 years ago
|
orxonox/trunk: the mighty useless crosshair…
|
File size:
709 bytes
|
Line | |
---|
1 | /*! |
---|
2 | \file crosshair.h |
---|
3 | \brief Definition of ... |
---|
4 | |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef _CROSSHAIR_H |
---|
8 | #define _CROSSHAIR_H |
---|
9 | |
---|
10 | #include "event_listener.h" |
---|
11 | |
---|
12 | #include "vector.h" |
---|
13 | |
---|
14 | // FORWARD DEFINITION |
---|
15 | |
---|
16 | |
---|
17 | //! A class that enables the |
---|
18 | class Crosshair : public EventListener { |
---|
19 | |
---|
20 | public: |
---|
21 | Crosshair(); |
---|
22 | virtual ~Crosshair(); |
---|
23 | |
---|
24 | |
---|
25 | virtual void process(const Event &event); |
---|
26 | |
---|
27 | /** @returns the current 3D-position of the Crosshair */ |
---|
28 | const Vector& getPosition() { return this->position; }; |
---|
29 | |
---|
30 | void tick(float dt); |
---|
31 | void draw() const; |
---|
32 | |
---|
33 | private: |
---|
34 | Vector position; //!< The current position of the Crosshair |
---|
35 | float position2D[2]; //!< The 2D-position on the screen |
---|
36 | |
---|
37 | }; |
---|
38 | |
---|
39 | #endif /* _CROSSHAIR_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.