Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3150 was 3144, checked in by rgrieder, 16 years ago

Header file section clean up in orxonox/overlays (without stats). Also reduced dependencies as much as possible.

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