Changeset 1562 for code/trunk/src/orxonox/hud/RadarObject.h
- Timestamp:
- Jun 7, 2008, 3:39:48 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/hud/RadarObject.h
r1505 r1562 30 30 #define _RadarObject_H__ 31 31 32 #include <map> 33 32 34 #include <OgrePrerequisites.h> 33 35 #include <OgreSceneNode.h> … … 40 42 class _OrxonoxExport RadarObject 41 43 { 42 private: 43 Ogre::OverlayManager* om; // our one and only overlay manager 44 Ogre::SceneNode* node_; // node of object 45 int colour_; 44 public: 45 RadarObject(Ogre::OverlayContainer* container, Ogre::SceneNode* node, const ColourValue& colour = ColourValue(0.5, 0.5, 0.5, 1), const std::string& texturename = "white.tga"); 46 ~RadarObject(); 46 47 47 public: 48 RadarObject(Ogre::OverlayContainer* container, Ogre::SceneNode* node, int colour = 0); 49 ~RadarObject(); 50 void setColour(int colour); 51 void resetColour(); 48 void setMaterial(const ColourValue& colour, const std::string& texturename); 49 inline void setColour(const ColourValue& colour) 50 { this->setMaterial(colour, this->texturename_); } 51 inline void setTexture(const std::string& texturename) 52 { this->setMaterial(this->colour_, texturename); } 53 inline void resetMaterial() 54 { this->setMaterial(this->colour_, this->texturename_); } 55 52 56 Vector3 getPosition(); 53 57 Ogre::SceneNode* getNode(); … … 58 62 Ogre::PanelOverlayElement* panel_; // the panel used to show the dot 59 63 60 static int count;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 st atic const int WHITE = 99; // used if object got nav focus64 private: 65 static std::map<std::string, std::map<ColourValue, std::string> > materials_s; 66 unsigned static int count_s; 67 Ogre::SceneNode* node_; // node of object 68 ColourValue colour_; 69 std::string texturename_; 66 70 }; 67 71 }
Note: See TracChangeset
for help on using the changeset viewer.