Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/overlays/hud/HUDRadar.h @ 2081

Last change on this file since 2081 was 1819, checked in by rgrieder, 16 years ago

more fixes, sorry.

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Yuning Chai
24 *      Felix Schulthess
25 *   Co-authors:
26 *      Reto Grieder
27 *
28 */
29
30#ifndef _HUDRadar_H__
31#define _HUDRadar_H__
32
33#include "OrxonoxPrereqs.h"
34
35#include <vector>
36#include <map>
37#include <OgrePrerequisites.h>
38#include "overlays/OrxonoxOverlay.h"
39#include "objects/RadarListener.h"
40#include "objects/RadarViewable.h"
41
42namespace orxonox
43{
44    class _OrxonoxExport HUDRadar : public OrxonoxOverlay, public RadarListener
45    {
46    public:
47        HUDRadar();
48        ~HUDRadar();
49
50        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
51
52    private:
53        // XML accessors
54        float getHalfDotSizeDistance() const { return this->halfDotSizeDistance_; }
55        void setHalfDotSizeDistance(float distance) { this->halfDotSizeDistance_ = distance; }
56
57        float getMaximumDotSize() const { return this->maximumDotSize_; }
58        void setMaximumDotSize(float size) { this->maximumDotSize_ = size; }
59
60        float getRadarSensitivity() const { return this->sensitivity_; }
61        // used also by RadarListener interface!
62        void setRadarSensitivity(float sensitivity) { this->sensitivity_ = sensitivity; }
63
64        // RadarListener interface
65        void displayObject(RadarViewable* viewable, bool bIsMarked);
66        void radarTick(float dt);
67
68        std::map<RadarViewable::Shape, std::string> shapeMaterials_;
69
70        std::vector<Ogre::PanelOverlayElement*> radarDots_;
71        std::vector<Ogre::PanelOverlayElement*>::iterator itRadarDots_;
72        Ogre::PanelOverlayElement* marker_;
73
74        float halfDotSizeDistance_;
75        float maximumDotSize_;
76
77        float sensitivity_;
78    };
79}
80
81#endif /* _HUDRadar_H__ */
Note: See TracBrowser for help on using the repository browser.