Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation/src/orxonox/overlays/hud/HUDRadar.h @ 2653

Last change on this file since 2653 was 2485, checked in by landauf, 16 years ago

Merged objecthierarchy2 into presentation branch

Couln't merge 2 lines in Gamestate.cc and a whole block of code in GSDedicated.cc (it seems like oli implemented in both branches something like a network-tick-limiter but with different approaches)

Not yet tested in network mode and with bots
The SpaceShips movement is also not yet fully adopted to the new physics (see Engine class)

  • Property svn:eol-style set to native
File size: 2.6 KB
RevLine 
[1505]1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
[1502]4 *
[1505]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 *
[1502]22 *   Author:
23 *      Yuning Chai
[1614]24 *      Felix Schulthess
[1502]25 *   Co-authors:
[1614]26 *      Reto Grieder
[1502]27 *
28 */
[1283]29
[1604]30#ifndef _HUDRadar_H__
31#define _HUDRadar_H__
[1283]32
[1502]33#include "OrxonoxPrereqs.h"
34
[1614]35#include <vector>
36#include <map>
[1502]37#include <OgrePrerequisites.h>
[1604]38#include "overlays/OrxonoxOverlay.h"
[1819]39#include "objects/RadarListener.h"
40#include "objects/RadarViewable.h"
[1407]41
[1283]42namespace orxonox
43{
[1614]44    class _OrxonoxExport HUDRadar : public OrxonoxOverlay, public RadarListener
[1329]45    {
[1615]46    public:
[2087]47        HUDRadar(BaseObject* creator);
[1604]48        ~HUDRadar();
[1400]49
[1747]50        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
[2485]51        virtual void changedOwner();
[1604]52
[1615]53    private:
54        // XML accessors
[1613]55        float getHalfDotSizeDistance() const { return this->halfDotSizeDistance_; }
56        void setHalfDotSizeDistance(float distance) { this->halfDotSizeDistance_ = distance; }
[1604]57
[1613]58        float getMaximumDotSize() const { return this->maximumDotSize_; }
59        void setMaximumDotSize(float size) { this->maximumDotSize_ = size; }
60
[1615]61        float getRadarSensitivity() const { return this->sensitivity_; }
62        // used also by RadarListener interface!
63        void setRadarSensitivity(float sensitivity) { this->sensitivity_ = sensitivity; }
64
65        // RadarListener interface
[1613]66        void displayObject(RadarViewable* viewable, bool bIsMarked);
67        void radarTick(float dt);
[1604]68
[1613]69        std::map<RadarViewable::Shape, std::string> shapeMaterials_;
[1604]70
[1614]71        std::vector<Ogre::PanelOverlayElement*> radarDots_;
72        std::vector<Ogre::PanelOverlayElement*>::iterator itRadarDots_;
[1613]73        Ogre::PanelOverlayElement* marker_;
74
75        float halfDotSizeDistance_;
76        float maximumDotSize_;
77
78        float sensitivity_;
[2485]79
80        Pawn* owner_;
[1604]81    };
[1302]82}
[1283]83
[1604]84#endif /* _HUDRadar_H__ */
Note: See TracBrowser for help on using the repository browser.