[1454] | 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 | * Felix Schulthess |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
[1346] | 28 | |
---|
[1410] | 29 | #ifndef _RadarObject_H__ |
---|
| 30 | #define _RadarObject_H__ |
---|
| 31 | |
---|
[1346] | 32 | #include <OgrePrerequisites.h> |
---|
[1450] | 33 | #include <OgreSceneNode.h> |
---|
[1408] | 34 | #include <OgrePanelOverlayElement.h> |
---|
[1450] | 35 | #include "OrxonoxPrereqs.h" |
---|
[1408] | 36 | #include "util/Math.h" |
---|
[1346] | 37 | |
---|
| 38 | namespace orxonox |
---|
| 39 | { |
---|
| 40 | class _OrxonoxExport RadarObject |
---|
| 41 | { |
---|
[1410] | 42 | private: |
---|
| 43 | Ogre::OverlayManager* om; // our one and only overlay manager |
---|
[1450] | 44 | Ogre::SceneNode* node_; // node of object |
---|
| 45 | int colour_; |
---|
[1346] | 46 | |
---|
[1410] | 47 | public: |
---|
[1450] | 48 | RadarObject(Ogre::OverlayContainer* container, Ogre::SceneNode* node, int colour = 0); |
---|
[1410] | 49 | ~RadarObject(); |
---|
[1450] | 50 | void setColour(int colour); |
---|
| 51 | void resetColour(); |
---|
| 52 | Vector3 getPosition(); |
---|
[1456] | 53 | Ogre::SceneNode* getNode(); |
---|
[1346] | 54 | |
---|
[1410] | 55 | bool right_; |
---|
| 56 | int index_; // index number of object |
---|
| 57 | Ogre::OverlayContainer* container_; |
---|
| 58 | Ogre::PanelOverlayElement* panel_; // the panel used to show the dot |
---|
[1346] | 59 | |
---|
[1410] | 60 | static int count; |
---|
[1450] | 61 | static const int RED = 0; |
---|
| 62 | static const int YELLOW = 1; |
---|
| 63 | static const int GREEN = 2; |
---|
| 64 | static const int BLUE = 3; |
---|
| 65 | static const int WHITE = 99; // used if object got nav focus |
---|
[1410] | 66 | }; |
---|
[1346] | 67 | } |
---|
| 68 | |
---|
[1410] | 69 | #endif /* _RadarObject_H__ */ |
---|