Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core5/src/orxonox/interfaces/RadarViewable.h @ 5879

Last change on this file since 5879 was 5858, checked in by rgrieder, 15 years ago

Cleanup in *Prereqs.h files

  • Removed forward declarations to non-existent classes
  • Ordered all declarations by name and folder
  • introduce new section: "Enums" for those files with enums.
  • Added missing declarations
  • Property svn:eol-style set to native
File size: 3.8 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#include "tools/ToolsPrereqs.h"
41
42namespace orxonox
43{
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
57
58    public:
59        RadarViewable();
60        virtual ~RadarViewable();
61
62        inline void setRadarObjectCamouflage(float camouflage)
63            { this->radarObjectCamouflage_ = camouflage; }
64        inline float getRadarObjectCamouflage() const
65            { return this->radarObjectCamouflage_; }
66
67        inline void setRadarObjectColour(const ColourValue& colour)
68            { this->radarObjectColour_ = colour; }
69        inline const ColourValue& getRadarObjectColour() const
70            { return this->radarObjectColour_; }
71
72        void setRadarObjectDescription(const std::string& str);
73        inline const std::string& getRadarObjectDescription() const
74            { return this->radarObjectDescription_; }
75
76        inline void setRadarVisibility(bool b)
77            { this->bVisibility_ = b; }
78        inline bool getRadarVisibility() const
79            { return this->bVisibility_; }
80
81        virtual const WorldEntity* getWorldEntity() const = 0;
82
83        const Vector3& getRVWorldPosition() const;
84        Vector3 getRVOrientedVelocity() const;
85
86        inline void setRadarObjectShape(Shape shape)
87            { this->radarObjectShape_ = shape; }
88        inline Shape getRadarObjectShape() const
89            { return this->radarObjectShape_; }
90
91/*
92        inline void setMapNode(Ogre::SceneNode * node)
93            { this->MapNode_ = node; }
94        inline Ogre::SceneNode * getMapNode() const
95            { return this->MapNode_; }
96        inline void setMapEntity(Ogre::Entity * ent)
97            { this->MapEntity_ = ent; }
98        inline Ogre::Entity * getMapEntity() const
99            { return this->MapEntity_; }
100*/
101        //Used for Map
102        Ogre::SceneNode * MapNode_;
103        Ogre::Entity * MapEntity_;
104        Ogre::DynamicLines* line_;
105        Ogre::SceneNode * LineNode_;
106        void addMapEntity();
107        void updateMapPosition();
108        bool isHumanShip_;
109        inline const std::string& getUniqueId()
110        {
111            return this->uniqueId_;
112        }
113        //friend class Map;
114
115    private:
116        void validate(const WorldEntity* object) const;
117        bool bVisibility_;
118        //Map
119        std::string uniqueId_;
120
121
122        //Radar
123        float radarObjectCamouflage_;
124        Shape radarObjectShape_;
125        std::string radarObjectDescription_;
126        ColourValue radarObjectColour_;
127
128    };
129}
130
131#endif /* _RadarViewable_H__ */
Note: See TracBrowser for help on using the repository browser.