Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/interfaces/RadarViewable.h @ 6271

Last change on this file since 6271 was 5781, checked in by rgrieder, 15 years ago

Reverted trunk again. We might want to find a way to delete these revisions again (x3n's changes are still available as diff in the commit mails).

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