- Timestamp:
- Jun 15, 2008, 1:09:07 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/overlays/hud/RadarObject.cc
r1599 r1604 41 41 { 42 42 template <> 43 class less<orxonox::ColourValue>43 bool less<orxonox::ColourValue>::operator()(const orxonox::ColourValue& __x, const orxonox::ColourValue& __y) const 44 44 { 45 public: 46 bool operator()(const orxonox::ColourValue& __x, const orxonox::ColourValue& __y) const 45 if (__x.r == __y.r) 46 { 47 if (__x.g == __y.g) 47 48 { 48 if (__x. r == __y.r)49 if (__x.b == __y.b) 49 50 { 50 if (__x.g == __y.g) 51 { 52 if (__x.b == __y.b) 53 { 54 return __x.a < __y.a; 55 } 56 return __x.b < __y.b; 57 } 58 return __x.g < __y.g; 51 return __x.a < __y.a; 59 52 } 60 return __x. r < __y.r;53 return __x.b < __y.b; 61 54 } 62 }; 55 return __x.g < __y.g; 56 } 57 return __x.r < __y.r; 58 } 63 59 } 64 60 … … 69 65 std::map<std::string, std::map<ColourValue, std::string> > RadarObject::materials_s; 70 66 71 RadarObject::RadarObject(Ogre::Overlay Container* container, WorldEntity* object, const ColourValue& colour, const std::string& texturename)67 RadarObject::RadarObject(Ogre::Overlay* container, WorldEntity* object, const ColourValue& colour, const std::string& texturename) 72 68 { 73 69 this->colour_ = colour; … … 78 74 this->panel_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarObject" + getConvertedValue<unsigned int, std::string>(RadarObject::count_s++))); 79 75 this->setMaterial(colour, texturename); 80 81 this->panel_->setDimensions(3, 3); 82 this->panel_->setMetricsMode(Ogre::GMM_PIXELS); 83 this->panel_->show(); 84 85 container->addChild(panel_); 76 this->panel_->setDimensions(0.01, 0.01); 77 container->add2D(panel_); 86 78 } 87 79
Note: See TracChangeset
for help on using the changeset viewer.