Changeset 1614 for code/branches/hud/src/orxonox/Radar.cc
- Timestamp:
- Jun 21, 2008, 2:35:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/Radar.cc
r1613 r1614 23 23 * Reto Grieder 24 24 * Co-authors: 25 * ...25 * Felix Schulthess 26 26 * 27 27 */ … … 38 38 #include "objects/SpaceShip.h" 39 39 #include "core/CoreIncludes.h" 40 #include "RadarListener.h" 40 41 //#include "core/ConfigValueIncludes.h" 41 42 42 43 namespace orxonox 43 44 { 44 RadarListener::RadarListener()45 {46 RegisterRootObject(RadarListener);47 }48 49 45 SetConsoleCommand(Radar, cycleNavigationFocus, true).setAccessLevel(AccessLevel::User); 50 46 SetConsoleCommand(Radar, releaseNavigationFocus, true).setAccessLevel(AccessLevel::User); … … 86 82 } 87 83 88 /*void Radar::unregisterObject(RadarViewable* object)89 {90 if (this->focus_ == object)91 this->focus_ = 0;92 // TODO: check for focus93 }*/94 95 84 const RadarViewable* Radar::getFocus() 96 85 { … … 119 108 for (Iterator<RadarListener> itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener) 120 109 { 110 (*itListener)->radarTick(dt); 111 121 112 for (Iterator<RadarViewable> itElement = ObjectList<RadarViewable>::begin(); itElement; ++itElement) 122 113 { … … 124 115 (*itListener)->displayObject(*itElement, *itElement == this->focus_); 125 116 } 126 127 (*itListener)->radarTick(dt);128 129 if (this->focus_ == 0)130 (*itListener)->hideMarker();131 117 } 132 118 } … … 190 176 } 191 177 178 void Radar::listObjects() const 179 { 180 COUT(3) << "List of RadarObjects:\n"; 181 // iterate through all Radar Objects 182 unsigned int i = 0; 183 for (Iterator<RadarViewable> it = ObjectList<RadarViewable>::start(); it; ++it, ++i) 184 { 185 COUT(3) << i++ << ": " << (*it)->getWorldPosition() << std::endl; 186 } 187 } 188 192 189 193 190 /*static*/ Radar& Radar::getInstance()
Note: See TracChangeset
for help on using the changeset viewer.