[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 | |
---|
| 27 | #ifndef _MAP_H__ |
---|
| 28 | #define _MAP_H__ |
---|
| 29 | |
---|
[2913] | 30 | #include <string> |
---|
[2837] | 31 | #include "OrxonoxPrereqs.h" |
---|
| 32 | #include <OgrePrerequisites.h> |
---|
[2856] | 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> |
---|
[2837] | 40 | |
---|
| 41 | #include <OgreBorderPanelOverlayElement.h> |
---|
| 42 | #include <OgreTextAreaOverlayElement.h> |
---|
| 43 | |
---|
| 44 | #include "overlays/OrxonoxOverlay.h" |
---|
| 45 | #include "objects/Tickable.h" |
---|
| 46 | |
---|
| 47 | |
---|
[2913] | 48 | |
---|
[2837] | 49 | namespace orxonox |
---|
| 50 | { |
---|
| 51 | class _OrxonoxExport Map : public OrxonoxOverlay, public Tickable |
---|
| 52 | { |
---|
| 53 | |
---|
| 54 | public: // functions |
---|
| 55 | Map(BaseObject* creator); |
---|
| 56 | virtual ~Map() {} |
---|
| 57 | |
---|
| 58 | virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); |
---|
| 59 | virtual void tick(float dt); |
---|
[2913] | 60 | virtual void changedOwner(); |
---|
[2837] | 61 | |
---|
[2913] | 62 | static Ogre::MaterialPtr createRenderCamera(Ogre::Camera * cam, std::string matName); |
---|
[2837] | 63 | |
---|
[2856] | 64 | static void openMap(); |
---|
[2913] | 65 | |
---|
| 66 | static const int maxRange_s=1000; |
---|
[2856] | 67 | |
---|
[2837] | 68 | private: // functions |
---|
[2856] | 69 | void toggleVisibility(); |
---|
[2913] | 70 | void updatePositions(); |
---|
[2837] | 71 | |
---|
| 72 | |
---|
| 73 | private: // variables |
---|
[2856] | 74 | Ogre::SceneManager* sManager_; |
---|
[2913] | 75 | Ogre::SceneManager* mapSceneM_; |
---|
| 76 | Ogre::SceneNode* rootNode_; |
---|
[2856] | 77 | Ogre::OverlayManager * oManager_; |
---|
[2913] | 78 | Ogre::Camera* mReflectCam_; |
---|
| 79 | |
---|
[2856] | 80 | |
---|
[2913] | 81 | |
---|
[2856] | 82 | bool isVisible_; |
---|
[2837] | 83 | }; |
---|
| 84 | } |
---|
| 85 | |
---|
| 86 | #endif /* _MAP_H__ */ |
---|