Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/consolecommands2/src/orxonox/overlays/Map.h @ 7438

Last change on this file since 7438 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.2 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 *      Si Sun
24 *
25 */
26
27#ifndef _Map_H__
28#define _Map_H__
29
30#include "OrxonoxPrereqs.h"
31
32#include <OgreMaterial.h>
33
34#include "util/UtilPrereqs.h"
35#include "tools/interfaces/Tickable.h"
36#include "overlays/OrxonoxOverlay.h"
37
38namespace orxonox
39{
40    class _OrxonoxExport Map : public OrxonoxOverlay, public Tickable
41    {
42
43    public: // functions
44        Map(BaseObject* creator);
45        virtual ~Map();
46
47        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
48        virtual void tick(float dt);
49        virtual void changedOwner();
50
51        static Ogre::MaterialPtr createRenderCamera(Ogre::Camera * cam, const std::string& matName);
52
53        static void openMap();
54        // HACK!
55        static void hackDestroyMap();
56
57//Not yet implemented
58        static const int maxRange_s=1000;
59
60        static void rotateYaw(const Vector2& value);
61        static void rotatePitch(const Vector2& value);
62        static void Zoom(const Vector2& value);
63        // variables
64
65
66        bool inline getVisibility()
67            { return this->isVisible_; };
68
69        static inline Ogre::SceneManager* getMapSceneManagerPtr()
70        {
71            return Map::singletonMap_s->mapSceneM_s;
72        }
73        static inline Map* getSingletonPtr()
74        {
75            return Map::singletonMap_s;
76        }
77
78        static inline Ogre::SceneManager* getMapSceneManager()
79        {
80            return Map::mapSceneM_s;
81        }
82
83
84
85    private: // functions
86
87        void toggleVisibility();
88        void updatePositions();
89//        void changedPlayerNode();
90        static inline void setMapSceneManager( Ogre::SceneManager * sm)
91        {
92            Map::mapSceneM_s = sm;
93        }
94        //static Ogre::MaterialPtr init();
95
96    private: // variables
97        static Map* singletonMap_s;
98
99        Ogre::SceneManager* sManager_;
100        Ogre::OverlayManager * oManager_;
101
102        static Ogre::SceneManager* mapSceneM_s;
103        static Ogre::SceneNode* CamNode_;
104        static Ogre::Camera* Cam_;
105        static Ogre::MaterialPtr OverlayMaterial_;
106        static Ogre::Overlay* overlay_;
107        //Ogre::SceneNode* CamNodeHelper_;
108        Ogre::SceneNode* playerShipNode_;
109        Ogre::SceneNode* planeNode_;
110        Ogre::MovablePlane* movablePlane_;
111        int mouseLookSpeed_;
112        bool isVisible_;
113
114    friend class RadarViewable;
115    };
116}
117
118#endif /* _Map_H__ */
Note: See TracBrowser for help on using the repository browser.