source:
orxonox.OLD/orxonox/trunk/src/world_entities/weapons/crosshair.h
@
4781
Last change on this file since 4781 was 4781, checked in by bensch, 19 years ago | |
---|---|
File size: 709 bytes |
Rev | Line | |
---|---|---|
[4779] | 1 | /*! |
2 | \file crosshair.h | |
[3955] | 3 | \brief Definition of ... |
[3329] | 4 | |
[3245] | 5 | */ |
[1853] | 6 | |
[4779] | 7 | #ifndef _CROSSHAIR_H |
8 | #define _CROSSHAIR_H | |
[1853] | 9 | |
[4779] | 10 | #include "event_listener.h" |
[1853] | 11 | |
[4779] | 12 | #include "vector.h" |
13 | ||
[3955] | 14 | // FORWARD DEFINITION |
[3543] | 15 | |
16 | ||
[4779] | 17 | //! A class that enables the |
18 | class Crosshair : public EventListener { | |
[2036] | 19 | |
[1904] | 20 | public: |
[4779] | 21 | Crosshair(); |
22 | virtual ~Crosshair(); | |
[1853] | 23 | |
[3245] | 24 | |
[4779] | 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); | |
[4781] | 31 | void draw() const; |
[4779] | 32 | |
[3245] | 33 | private: |
[4779] | 34 | Vector position; //!< The current position of the Crosshair |
[4781] | 35 | float position2D[2]; //!< The 2D-position on the screen |
[3245] | 36 | |
[1853] | 37 | }; |
38 | ||
[4779] | 39 | #endif /* _CROSSHAIR_H */ |
Note: See TracBrowser
for help on using the repository browser.