Changeset 1564 for code/trunk/src/orxonox/hud/HUD.h
- Timestamp:
- Jun 8, 2008, 5:46:52 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/hud/HUD.h
r1562 r1564 35 35 #include <OgrePrerequisites.h> 36 36 #include <OgreTextAreaOverlayElement.h> 37 #include <OgreSceneNode.h>38 37 #include "objects/Tickable.h" 39 38 #include "util/Math.h" … … 43 42 class _OrxonoxExport HUD : public TickableReal 44 43 { 45 private: 46 HUD(); 47 HUD(HUD& instance); 48 ~HUD(); 49 Ogre::OverlayManager* om; 50 Ogre::SceneManager* sm; 51 Ogre::Overlay* orxonoxHUD; 52 Ogre::OverlayContainer* container; 53 Ogre::TextAreaOverlayElement* fpsText; 54 Ogre::TextAreaOverlayElement* rTRText; 55 BarOverlayElement* energyBar; 56 BarOverlayElement* speedoBar; 57 RadarOverlayElement* radar; 58 Navigation* nav; 44 public: 45 static HUD& getSingleton(); 46 virtual void tick(float); 59 47 60 bool showFPS; 61 bool showRenderTime; 62 63 public: 64 virtual void tick(float); 65 void addRadarObject(Ogre::SceneNode* node, const ColourValue& colour = ColourValue(0.5, 0.5, 0.5, 1)); 66 void removeRadarObject(Ogre::SceneNode* node); 48 void resize(); 49 void addRadarObject(WorldEntity* object, const ColourValue& colour = ColourValue(0.5, 0.5, 0.5, 1)); 50 void removeRadarObject(WorldEntity* object); 67 51 void setRenderTimeRatio(float ratio); 68 52 void setFPS(); 69 53 70 std::set<RadarObject*> roSet; 54 inline std::list<RadarObject*>& getRadarObjects() 55 { return this->roSet_; } 56 57 static void setEnergy(float value); 58 static void cycleNavigationFocus(); 59 static void releaseNavigationFocus(); 60 static void toggleFPS(); 61 static void toggleRenderTime(); 62 63 private: 64 HUD(); 65 HUD(const HUD& instance); 66 ~HUD(); 71 67 72 68 static HUD* instance_s; 73 static HUD& getSingleton(); 74 static void setEnergy(float value); 75 static void cycleNavigationFocus(); 76 static void toggleFPS(); 77 static void toggleRenderTime(); 69 70 std::list<RadarObject*> roSet_; 71 Ogre::Overlay* orxonoxHUD_; 72 Ogre::OverlayContainer* container_; 73 BarOverlayElementFactory* barOverlayElementFactory_; 74 RadarOverlayElementFactory* radarOverlayElementFactory_; 75 Ogre::TextAreaOverlayElement* fpsText_; 76 Ogre::TextAreaOverlayElement* rTRText_; 77 BarOverlayElement* energyBar_; 78 BarOverlayElement* speedoBar_; 79 RadarOverlayElement* radar_; 80 Navigation* nav_; 81 82 bool showFPS_; 83 bool showRenderTime_; 78 84 }; 79 85 }
Note: See TracChangeset
for help on using the changeset viewer.