Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/map/src/orxonox/overlays/map/Map.h @ 2956

Last change on this file since 2956 was 2956, checked in by Naaduun, 15 years ago

added rotate and zoom to map. using static mapscenemanager now

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 <string>
31#include "OrxonoxPrereqs.h"
32#include <OgrePrerequisites.h>
33#include <OgreSceneManager.h>
34#include <OgreSceneNode.h>
35#include <OgreEntity.h>
36#include <OgreOverlay.h>
37#include <OgreOverlayElement.h>
38#include <OgreOverlayManager.h>
39#include <OgreOverlayContainer.h>
40
41#include <OgreBorderPanelOverlayElement.h>
42#include <OgreTextAreaOverlayElement.h>
43
44#include "overlays/OrxonoxOverlay.h"
45#include "objects/Tickable.h"
46
47
48
49namespace orxonox
50{
51    class _OrxonoxExport Map : public OrxonoxOverlay, public Tickable
52    {
53
54    public: // functions
55        Map(BaseObject* creator);
56        ~Map();
57
58        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
59        virtual void tick(float dt);
60        virtual void changedOwner();
61
62        static Ogre::MaterialPtr createRenderCamera(Ogre::Camera * cam, std::string matName);
63       
64        static void openMap();
65
66//Not yet implemented
67        static const int maxRange_s=1000;
68
69        static void rotateYaw(const Vector2& value);
70        static void rotatePitch(const Vector2& value);
71        static void Zoom(const Vector2& value);
72        // variables
73
74
75        bool inline getVisibility()
76            { return this->isVisible_; };
77
78        static inline Ogre::SceneManager* getMapSceneManagerPtr()
79        {
80            return Map::singletonMap_s->mapSceneM_s;
81        }
82        static inline Map* getSingletonPtr()
83        {
84            return Map::singletonMap_s;
85        }
86
87        static inline Ogre::SceneManager* getMapSceneManager()
88        {
89            return Map::mapSceneM_s;
90        }
91
92
93       
94    private: // functions
95
96        void toggleVisibility();
97        void updatePositions();
98//        void changedPlayerNode();
99        static inline void setMapSceneManager( Ogre::SceneManager * sm)
100        {
101            Map::mapSceneM_s = sm;
102        }
103
104    private: // variables
105        static Map* singletonMap_s;
106
107        Ogre::SceneManager* sManager_;
108        Ogre::OverlayManager * oManager_;
109
110        static Ogre::SceneManager* mapSceneM_s;
111        Ogre::SceneNode* CamNode_;
112        Ogre::Camera* Cam_;
113        //Ogre::SceneNode* CamNodeHelper_;
114        Ogre::SceneNode* playerShipNode_;
115        Ogre::SceneNode* planeNode_;
116       
117        int mouseLookSpeed_;
118        bool isVisible_;
119    };
120}
121
122#endif /* _MAP_H__ */
Note: See TracBrowser for help on using the repository browser.