Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/hudelements/src/orxonox/interfaces/RadarViewable.h @ 6880

Last change on this file since 6880 was 6727, checked in by scheusso, 16 years ago

HUDRadar now working again

  • Property svn:eol-style set to native
File size: 3.9 KB
RevLine 
[1818]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 *      Reto Grieder
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _RadarViewable_H__
30#define _RadarViewable_H__
31
32#include "OrxonoxPrereqs.h"
[3157]33
[1818]34#include <string>
35#include <cassert>
[3157]36
[1818]37#include "util/Math.h"
38#include "core/OrxonoxClass.h"
39
40namespace orxonox
41{
[6727]42    class BaseObject;
43
[1818]44    /**
45    @brief Interface for receiving window events.
46    */
47    class _OrxonoxExport RadarViewable : virtual public OrxonoxClass
48    {
49    public:
50        enum Shape
51        {
52            Square,
53            Dot,
54            Triangle
55        };
56
[3089]57
[1818]58    public:
[6727]59        RadarViewable(BaseObject* creator);
[3089]60        virtual ~RadarViewable();
[1818]61
[2662]62        inline void setRadarObjectCamouflage(float camouflage)
[6727]63            {
64                if( this->radarObjectCamouflage_ != camouflage )
65                {
66                    this->radarObjectCamouflage_ = camouflage;
67                    this->settingsChanged();
68                }
69            }
[2662]70        inline float getRadarObjectCamouflage() const
71            { return this->radarObjectCamouflage_; }
[1818]72
[2662]73        inline void setRadarObjectColour(const ColourValue& colour)
[6727]74            {
75                if(this->radarObjectColour_ != colour)
76                {
77                    this->radarObjectColour_ = colour;
78                    this->settingsChanged();
79                }
80            }
[2662]81        inline const ColourValue& getRadarObjectColour() const
82            { return this->radarObjectColour_; }
[1818]83
[6727]84//         void setRadarObjectDescription(const std::string& str);
85//         inline const std::string& getRadarObjectDescription() const
86//             { return this->radarObjectDescription_; }
[1818]87
[3064]88        inline void setRadarVisibility(bool b)
[6727]89            { 
90                if(b!=this->bVisibility_)
91                {
92                    this->bVisibility_ = b;
93                    this->settingsChanged();
94                }
95            }
[3064]96        inline bool getRadarVisibility() const
97            { return this->bVisibility_; }
98
[2662]99        virtual const WorldEntity* getWorldEntity() const = 0;
[1818]100
[2662]101        const Vector3& getRVWorldPosition() const;
102        Vector3 getRVOrientedVelocity() const;
[1818]103
[2662]104        inline void setRadarObjectShape(Shape shape)
[6727]105            {
106                if( this->radarObjectShape_ != shape )
107                {
108                    this->radarObjectShape_ = shape;
109                    this->settingsChanged();
110                }
111            }
[2662]112        inline Shape getRadarObjectShape() const
113            { return this->radarObjectShape_; }
[6727]114        void settingsChanged();
[1818]115
[6716]116
[3089]117        bool isHumanShip_;
[3157]118        inline const std::string& getUniqueId()
[3089]119        {
120            return this->uniqueId_;
121        }
[3101]122        //friend class Map;
[3089]123
[1818]124    private:
[3182]125        void validate(const WorldEntity* object) const;
[3064]126        bool bVisibility_;
[6727]127        bool bInitialized_;
[3089]128        //Map
129        std::string uniqueId_;
[6727]130        BaseObject* creator_;
[3089]131
132
133        //Radar
[1818]134        float radarObjectCamouflage_;
[2662]135        Shape radarObjectShape_;
[1818]136        std::string radarObjectDescription_;
137        ColourValue radarObjectColour_;
[3089]138
[1818]139    };
140}
141
142#endif /* _RadarViewable_H__ */
Note: See TracBrowser for help on using the repository browser.