Changeset 6942
- Timestamp:
- May 20, 2010, 8:30:38 PM (15 years ago)
- Location:
- code/branches/presentation3
- Files:
-
- 2 deleted
- 16 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3
- Property svn:mergeinfo changed
/code/branches/hudelements (added) merged: 6599-6600,6602,6606,6614-6615,6631,6715-6717,6727,6796,6849,6865,6868,6873-6875,6880,6886,6897-6899,6907,6913-6914,6917,6922-6924,6941
- Property svn:mergeinfo changed
-
code/branches/presentation3/src/modules/objects/triggers/CheckPoint.cc
r5929 r6942 38 38 CreateFactory(CheckPoint); 39 39 40 CheckPoint::CheckPoint(BaseObject* creator) : DistanceTrigger(creator) 40 CheckPoint::CheckPoint(BaseObject* creator) 41 : DistanceTrigger(creator) 42 , RadarViewable(creator) 41 43 { 42 44 RegisterObject(CheckPoint); -
code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.cc
r6502 r6942 29 29 #include "HUDNavigation.h" 30 30 31 #include <string>32 31 #include <OgreCamera.h> 32 #include <OgreFontManager.h> 33 33 #include <OgreOverlayManager.h> 34 34 #include <OgreTextAreaOverlayElement.h> … … 45 45 #include "controllers/HumanController.h" 46 46 #include "worldentities/pawns/Pawn.h" 47 #include "worldentities/WorldEntity.h" 48 #include "interfaces/RadarViewable.h" 47 49 48 50 namespace orxonox … … 55 57 RegisterObject(HUDNavigation); 56 58 57 // create nav text 58 navText_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton() 59 .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberString())); 60 61 // create nav marker 62 navMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() 63 .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberString())); 64 navMarker_->setMaterialName("Orxonox/NavArrows"); 65 66 /* 67 // create aim marker 68 aimMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() 69 .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberString())); 70 aimMarker_->setMaterialName("Orxonox/NavCrosshair"); 71 this->wasOutOfView_ = true; // Ensure the material is changed right the first time.. 72 59 // Set default values 73 60 setFont("Monofur"); 74 61 setTextSize(0.05f); 75 62 setNavMarkerSize(0.05f); 76 setAimMarkerSize(0.04f);77 */78 79 background_->addChild(navMarker_);80 // background_->addChild(aimMarker_);81 background_->addChild(navText_);82 83 // hide at first84 this->setVisible(false);85 63 } 86 64 … … 89 67 if (this->isInitialized()) 90 68 { 91 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->navMarker_); 92 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->navText_); 93 // Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->aimMarker_); 69 for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end();) 70 removeObject((it++)->first); 94 71 } 95 72 } … … 99 76 SUPER(HUDNavigation, XMLPort, xmlElement, mode); 100 77 101 XMLPortParam(HUDNavigation, "font", setFont, getFont,xmlElement, mode);102 XMLPortParam(HUDNavigation, "textSize", setTextSize, getTextSize,xmlElement, mode);78 XMLPortParam(HUDNavigation, "font", setFont, getFont, xmlElement, mode); 79 XMLPortParam(HUDNavigation, "textSize", setTextSize, getTextSize, xmlElement, mode); 103 80 XMLPortParam(HUDNavigation, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlElement, mode); 104 // XMLPortParam(HUDNavigation, "aimMarkerSize", setAimMarkerSize, getAimMarkerSize, xmlElement, mode);105 81 } 106 82 107 83 void HUDNavigation::setFont(const std::string& font) 108 84 { 109 if (this->navText_ && !font.empty()) 110 this->navText_->setFontName(font); 85 const Ogre::ResourcePtr& fontPtr = Ogre::FontManager::getSingleton().getByName(font); 86 if (fontPtr.isNull()) 87 { 88 COUT(2) << "Warning: HUDNavigation: Font '" << font << "' not found" << std::endl; 89 return; 90 } 91 fontName_ = font; 92 for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); ++it) 93 { 94 if (it->second.text_ != NULL) 95 it->second.text_->setFontName(fontName_); 96 } 111 97 } 112 98 113 99 const std::string& HUDNavigation::getFont() const 114 100 { 115 if (this->navText_) 116 return this->navText_->getFontName(); 117 else 118 return BLANKSTRING; 101 return fontName_; 119 102 } 120 103 121 104 void HUDNavigation::setTextSize(float size) 122 105 { 123 if (this->navText_ && size >= 0.0f) 124 this->navText_->setCharHeight(size); 106 if (size <= 0.0f) 107 { 108 COUT(2) << "Warning: HUDNavigation: Negative font size not allowed" << std::endl; 109 return; 110 } 111 textSize_ = size; 112 for (ObjectMap::iterator it = activeObjectList_.begin(); it!=activeObjectList_.end(); ++it) 113 { 114 if (it->second.text_) 115 it->second.text_->setCharHeight(size); 116 } 125 117 } 126 118 127 119 float HUDNavigation::getTextSize() const 128 120 { 129 if (this->navText_) 130 return this->navText_->getCharHeight(); 131 else 132 return 0.0f; 121 return textSize_; 133 122 } 134 123 … … 137 126 SUPER(HUDNavigation, tick, dt); 138 127 139 // Get radar 140 Radar* radar = this->getOwner()->getScene()->getRadar(); 141 142 if (!radar->getFocus()) 143 { 144 this->overlay_->hide(); 145 return; 146 } 147 else 148 { 149 this->overlay_->show(); 150 } 151 152 // set text 153 int dist = static_cast<int>(getDist2Focus()); 154 navText_->setCaption(multi_cast<std::string>(dist)); 155 float textLength = multi_cast<std::string>(dist).size() * navText_->getCharHeight() * 0.3f; 156 157 orxonox::Camera* cam = CameraManager::getInstance().getActiveCamera(); 158 if (!cam) 159 return; 160 const Matrix4& transform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix(); 161 // transform to screen coordinates 162 Vector3 pos = transform * radar->getFocus()->getRVWorldPosition(); 163 164 bool outOfView; 165 if (pos.z > 1.0) 166 { 167 // z > 1.0 means that the object is behind the camera 168 outOfView = true; 169 // we have to switch all coordinates (if you don't know why, 170 // try linear algebra lectures, because I can't explain..) 171 pos.x = -pos.x; 172 pos.y = -pos.y; 173 } 174 else 175 outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0; 176 177 if (outOfView) 178 { 179 // object is not in view 180 // aimMarker_->hide(); 181 182 if (!wasOutOfView_) 128 Camera* cam = CameraManager::getInstance().getActiveCamera(); 129 if (cam == NULL) 130 return; 131 const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix(); 132 133 for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); ++it) 134 { 135 // Get Distance to HumanController and save it in the TextAreaOverlayElement. 136 int dist = (int)((it->first->getRVWorldPosition() - HumanController::getLocalControllerEntityAsPawn()->getWorldPosition()).length() + 0.5f); 137 it->second.text_->setCaption(multi_cast<std::string>(dist)); 138 float textLength = multi_cast<std::string>(dist).size() * it->second.text_->getCharHeight() * 0.3f; 139 140 // Transform to screen coordinates 141 Vector3 pos = camTransform * it->first->getRVWorldPosition(); 142 143 bool outOfView = true; 144 if (pos.z > 1.0) 183 145 { 184 navMarker_->setMaterialName("Orxonox/NavArrows"); 185 wasOutOfView_ = true; 146 // z > 1.0 means that the object is behind the camera 147 outOfView = true; 148 // we have to switch all coordinates (if you don't know why, 149 // try linear algebra lectures, because I can't explain..) 150 pos.x = -pos.x; 151 pos.y = -pos.y; 186 152 } 187 188 if (pos.x < pos.y) 153 else 154 outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0; 155 156 if (outOfView) 189 157 { 190 if (pos.y > -pos.x) 158 // Object is not in view 159 160 // Change material only if outOfView changed 161 if (!it->second.wasOutOfView_) 191 162 { 192 // up 193 float position = pos.x / pos.y + 1.0f; 194 navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5f, 0.0f); 195 navMarker_->setUV(0.5f, 0.0f, 1.0f, 0.5f); 196 navText_->setLeft((position - textLength) * 0.5f); 197 navText_->setTop(navMarker_->getHeight()); 163 it->second.panel_->setMaterialName("Orxonox/NavArrows"); 164 it->second.wasOutOfView_ = true; 165 } 166 167 // Switch between top, bottom, left and right position of the arrow at the screen border 168 if (pos.x < pos.y) 169 { 170 if (pos.y > -pos.x) 171 { 172 // Top 173 float position = pos.x / pos.y + 1.0f; 174 it->second.panel_->setPosition((position - it->second.panel_->getWidth()) * 0.5f, 0.0f); 175 it->second.panel_->setUV(0.5f, 0.0f, 1.0f, 0.5f); 176 it->second.text_->setLeft((position - textLength) * 0.5f); 177 it->second.text_->setTop(it->second.panel_->getHeight()); 178 } 179 else 180 { 181 // Left 182 float position = pos.y / pos.x + 1.0f; 183 it->second.panel_->setPosition(0.0f, (position - it->second.panel_->getWidth()) * 0.5f); 184 it->second.panel_->setUV(0.0f, 0.0f, 0.5f, 0.5f); 185 it->second.text_->setLeft(it->second.panel_->getWidth() + 0.01f); 186 it->second.text_->setTop((position - it->second.text_->getCharHeight()) * 0.5f); 187 } 198 188 } 199 189 else 200 190 { 201 // left 202 float position = pos.y / pos.x + 1.0f; 203 navMarker_->setPosition(0.0f, (position - navMarker_->getWidth()) * 0.5f); 204 navMarker_->setUV(0.0f, 0.0f, 0.5f, 0.5f); 205 navText_->setLeft(navMarker_->getWidth() + 0.01f); 206 navText_->setTop((position - navText_->getCharHeight()) * 0.5f); 191 192 if (pos.y < -pos.x) 193 { 194 // Bottom 195 float position = -pos.x / pos.y + 1.0f; 196 it->second.panel_->setPosition((position - it->second.panel_->getWidth()) * 0.5f, 1.0f - it->second.panel_->getHeight()); 197 it->second.panel_->setUV(0.0f, 0.5f, 0.5f, 1.0f); 198 it->second.text_->setLeft((position - textLength) * 0.5f); 199 it->second.text_->setTop(1.0f - it->second.panel_->getHeight() - it->second.text_->getCharHeight()); 200 } 201 else 202 { 203 // Right 204 float position = -pos.y / pos.x + 1.0f; 205 it->second.panel_->setPosition(1.0f - it->second.panel_->getWidth(), (position - it->second.panel_->getHeight()) * 0.5f); 206 it->second.panel_->setUV(0.5f, 0.5f, 1.0f, 1.0f); 207 it->second.text_->setLeft(1.0f - it->second.panel_->getWidth() - textLength - 0.01f); 208 it->second.text_->setTop((position - it->second.text_->getCharHeight()) * 0.5f); 209 } 207 210 } 208 211 } 209 212 else 210 213 { 211 if (pos.y < -pos.x) 214 // Object is in view 215 216 // Change material only if outOfView changed 217 if (it->second.wasOutOfView_) 212 218 { 213 // down 214 float position = -pos.x / pos.y + 1.0f; 215 navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5f, 1.0f - navMarker_->getHeight()); 216 navMarker_->setUV(0.0f, 0.5f, 0.5f, 1.0f); 217 navText_->setLeft((position - textLength) * 0.5f); 218 navText_->setTop(1.0f - navMarker_->getHeight() - navText_->getCharHeight()); 219 it->second.panel_->setMaterialName("Orxonox/NavTDC"); 220 it->second.wasOutOfView_ = false; 219 221 } 220 else 221 {222 // right223 float position = -pos.y / pos.x + 1.0f;224 navMarker_->setPosition(1.0f - navMarker_->getWidth(), (position - navMarker_->getHeight()) * 0.5f);225 navMarker_->setUV(0.5f, 0.5f, 1.0f, 1.0f); 226 navText_->setLeft(1.0f - navMarker_->getWidth() - textLength - 0.01f);227 navText_->setTop((position - navText_->getCharHeight()) * 0.5f);228 }222 223 // Position marker 224 it->second.panel_->setUV(0.0f, 0.0f, 1.0f, 1.0f); 225 it->second.panel_->setLeft((pos.x + 1.0f - it->second.panel_->getWidth()) * 0.5f); 226 it->second.panel_->setTop((-pos.y + 1.0f - it->second.panel_->getHeight()) * 0.5f); 227 228 // Position text 229 it->second.text_->setLeft((pos.x + 1.0f + it->second.panel_->getWidth()) * 0.5f); 230 it->second.text_->setTop((-pos.y + 1.0f + it->second.panel_->getHeight()) * 0.5f); 229 231 } 230 } 231 else 232 { 233 // object is in view 234 /* 235 Vector3 aimpos = transform * getPredictedPosition(SpaceShip::getLocalShip()->getPosition(), 236 Projectile::getSpeed(), Radar::getInstance().getFocus()->getRVWorldPosition(), Radar::getInstance().getFocus()->getRVOrientedVelocity()); 237 */ 238 if (wasOutOfView_) 239 { 240 navMarker_->setMaterialName("Orxonox/NavTDC"); 241 wasOutOfView_ = false; 242 } 243 244 // object is in view 245 navMarker_->setUV(0.0f, 0.0f, 1.0f, 1.0f); 246 navMarker_->setLeft((pos.x + 1.0f - navMarker_->getWidth()) * 0.5f); 247 navMarker_->setTop((-pos.y + 1.0f - navMarker_->getHeight()) * 0.5f); 248 249 /* 250 aimMarker_->show(); 251 aimMarker_->setLeft((aimpos.x + 1.0f - aimMarker_->getWidth()) * 0.5f); 252 aimMarker_->setTop((-aimpos.y + 1.0f - aimMarker_->getHeight()) * 0.5f); 253 */ 254 navText_->setLeft((pos.x + 1.0f + navMarker_->getWidth()) * 0.5f); 255 navText_->setTop((-pos.y + 1.0f + navMarker_->getHeight()) * 0.5f); 256 } 257 } 258 259 float HUDNavigation::getDist2Focus() const 260 { 261 Radar* radar = this->getOwner()->getScene()->getRadar(); 262 if (radar->getFocus() && HumanController::getLocalControllerEntityAsPawn()) 263 return (radar->getFocus()->getRVWorldPosition() - HumanController::getLocalControllerEntityAsPawn()->getWorldPosition()).length(); 264 else 265 return 0; 266 } 267 268 /** 269 @brief Overridden method of OrxonoxOverlay. Usually the entire overlay 270 scales with scale(). Here we obviously have to adjust this. 232 233 // Make sure the overlays are shown 234 it->second.panel_->show(); 235 it->second.text_->show(); 236 } 237 } 238 239 240 /** Overridden method of OrxonoxOverlay. 241 @details 242 Usually the entire overlay scales with scale(). 243 Here we obviously have to adjust this. 271 244 */ 272 245 void HUDNavigation::sizeChanged() 273 246 { 274 // use size to compensate for aspect ratio if enabled.247 // Use size to compensate for aspect ratio if enabled. 275 248 float xScale = this->getActualSize().x; 276 249 float yScale = this->getActualSize().y; 277 if (this->navMarker_) 278 navMarker_->setDimensions(navMarkerSize_ * xScale, navMarkerSize_ * yScale); 279 /* 280 if (this->aimMarker_) 281 aimMarker_->setDimensions(aimMarkerSize_ * xScale, aimMarkerSize_ * yScale); 282 */ 283 if (this->navText_) 284 navText_->setCharHeight(navText_->getCharHeight() * yScale); 250 251 for (ObjectMap::iterator it = activeObjectList_.begin(); it!=activeObjectList_.end(); ++it) 252 { 253 if (it->second.panel_ != NULL) 254 it->second.panel_->setDimensions(navMarkerSize_ * xScale, navMarkerSize_ * yScale); 255 if (it->second.text_ != NULL) 256 it->second.text_->setCharHeight(it->second.text_->getCharHeight() * yScale); 257 } 258 } 259 260 void HUDNavigation::addObject(RadarViewable* object) 261 { 262 if (object == NULL) 263 return; 264 265 // Don't display our own ship 266 if (object == dynamic_cast<RadarViewable*>(this->getOwner())) 267 return; 268 269 // Object hasn't been added yet (we know that) 270 assert(this->activeObjectList_.find(object) == this->activeObjectList_.end()); 271 272 // Scales used for dimensions and text size 273 float xScale = this->getActualSize().x; 274 float yScale = this->getActualSize().y; 275 276 // Create everything needed to display the object on the radar and add it to the map 277 278 // Create arrow/marker 279 Ogre::PanelOverlayElement* panel = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() 280 .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberString())); 281 panel->setMaterialName("Orxonox/NavTDC"); 282 panel->setDimensions(navMarkerSize_ * xScale, navMarkerSize_ * yScale); 283 284 Ogre::TextAreaOverlayElement* text = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton() 285 .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberString())); 286 text->setFontName(this->fontName_); 287 text->setCharHeight(text->getCharHeight() * yScale); 288 289 ObjectInfo tempStruct = {panel, text, false}; 290 activeObjectList_[object] = tempStruct; 291 292 this->background_->addChild(panel); 293 this->background_->addChild(text); 294 } 295 296 void HUDNavigation::removeObject(RadarViewable* viewable) 297 { 298 ObjectMap::iterator it = activeObjectList_.find(viewable); 299 300 if (activeObjectList_.find(viewable) != activeObjectList_.end()) 301 { 302 // Detach overlays 303 this->background_->removeChild(it->second.panel_->getName()); 304 this->background_->removeChild(it->second.text_->getName()); 305 // Properly destroy the overlay elements (do not use delete!) 306 Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.panel_); 307 Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.text_); 308 // Remove from the list 309 activeObjectList_.erase(viewable); 310 } 311 else 312 COUT(2) << "Warning, HUDNavigation: Attempting to remove non-existent object" << std::endl; 313 } 314 315 void HUDNavigation::changedOwner() 316 { 317 // TODO: Delete old objects? 318 const std::set<RadarViewable*>& respawnObjects = this->getOwner()->getScene()->getRadar()->getRadarObjects(); 319 for (std::set<RadarViewable*>::const_iterator it = respawnObjects.begin(); it != respawnObjects.end(); ++it) 320 { 321 if (!(*it)->isHumanShip_) 322 this->addObject(*it); 323 } 285 324 } 286 325 } -
code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.h
r6417 r6942 32 32 #include "overlays/OverlaysPrereqs.h" 33 33 34 #include <map> 35 #include <string> 36 34 37 #include "util/OgreForwardRefs.h" 35 38 #include "tools/interfaces/Tickable.h" 39 #include "interfaces/RadarListener.h" 36 40 #include "overlays/OrxonoxOverlay.h" 37 41 38 42 namespace orxonox 39 43 { 40 class _OverlaysExport HUDNavigation : public OrxonoxOverlay, public Tickable 44 class _OverlaysExport HUDNavigation : public OrxonoxOverlay, public Tickable, public RadarListener 41 45 { 42 46 public: … … 47 51 virtual void tick(float dt); 48 52 53 virtual void addObject(RadarViewable* object); 54 virtual void removeObject(RadarViewable* viewable); 55 virtual void objectChanged(RadarViewable* viewable) {} 56 57 virtual void changedOwner(); 58 virtual void sizeChanged(); 59 virtual void angleChanged() { } 60 virtual void positionChanged() { } 61 virtual void radarTick(float dt) {} 62 63 inline float getRadarSensitivity() const 64 { return 1.0f; } 65 49 66 private: 50 void sizeChanged(); 51 void angleChanged() { } 52 void positionChanged() { } 67 struct ObjectInfo 68 { 69 Ogre::PanelOverlayElement* panel_; 70 Ogre::TextAreaOverlayElement* text_; 71 bool outOfView_; 72 bool wasOutOfView_; 73 }; 53 74 54 75 // XMLPort accessors 55 void setNavMarkerSize(float size) { this->navMarkerSize_ = size; this->sizeChanged(); } 56 float getNavMarkerSize() const { return this->navMarkerSize_; } 57 58 /* 59 void setAimMarkerSize(float size) { this->aimMarkerSize_ = size; this->sizeChanged(); } 60 float getAimMarkerSize() const { return this->aimMarkerSize_; } 61 */ 76 void setNavMarkerSize(float size) 77 { navMarkerSize_ = size; this->sizeChanged(); } 78 float getNavMarkerSize() const 79 { return navMarkerSize_; } 62 80 63 81 void setTextSize(float size); … … 67 85 const std::string& getFont() const; 68 86 69 void updateMarker(); 70 void updateFocus(); 71 float getDist2Focus() const; 87 typedef std::map<RadarViewable*, ObjectInfo > ObjectMap; 88 ObjectMap activeObjectList_; 72 89 73 Ogre::PanelOverlayElement* navMarker_; //!< the panel used to show the arrow and the target marker 74 float navMarkerSize_; //!< One paramter size of the navigation marker 75 /* 76 Ogre::PanelOverlayElement* aimMarker_; //!< Panel used to show the aim Marker 77 float aimMarkerSize_; //!< One paramter size of the aim marker 78 */ 79 Ogre::TextAreaOverlayElement* navText_; //!< Text overlay to display the target distance 80 bool wasOutOfView_; //!< Performance booster variable: setMaterial is not cheap 90 float navMarkerSize_; 91 std::string fontName_; 92 float textSize_; 81 93 }; 82 94 } -
code/branches/presentation3/src/modules/overlays/hud/HUDRadar.cc
r6502 r6942 40 40 #include "worldentities/WorldEntity.h" 41 41 #include "worldentities/pawns/Pawn.h" 42 #include "Scene.h" 43 #include "Radar.h" 42 44 43 45 namespace orxonox 44 46 { 45 CreateFactory(HUDRadar); 47 CreateFactory(HUDRadar); 46 48 47 49 HUDRadar::HUDRadar(BaseObject* creator) … … 72 74 { 73 75 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->marker_); 74 for (std:: vector<Ogre::PanelOverlayElement*>::iterator it = this->radarDots_.begin();75 it != this->radar Dots_.end(); ++it)76 for (std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it = this->radarObjects_.begin(); 77 it != this->radarObjects_.end(); ++it) 76 78 { 77 Ogre::OverlayManager::getSingleton().destroyOverlayElement( *it);79 Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second); 78 80 } 79 81 } … … 89 91 } 90 92 91 void HUDRadar:: displayObject(RadarViewable* object, bool bIsMarked)93 void HUDRadar::addObject(RadarViewable* object) 92 94 { 93 if (object == static_cast<RadarViewable*>(this->owner_))95 if (object == dynamic_cast<RadarViewable*>(this->owner_)) 94 96 return; 95 97 96 const WorldEntity* wePointer = object->getWorldEntity(); 98 // Make sure the object hasn't been added yet 99 assert( this->radarObjects_.find(object) == this->radarObjects_.end() ); 97 100 98 // Just to be sure that we actually have a WorldEntity. 99 // We could do a dynamic_cast, but that would be a lot slower. 100 if (!wePointer || !this->owner_) 101 // Create everything needed to display the object on the radar and add it to the map 102 Ogre::PanelOverlayElement* panel; 103 panel = static_cast<Ogre::PanelOverlayElement*>( 104 Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarDot" + getUniqueNumberString())); 105 this->overlay_->add2D(panel); 106 // get right material 107 panel->setMaterialName(TextureGenerator::getMaterialName( 108 shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour())); 109 this->radarObjects_[object] = panel; 110 } 111 112 void HUDRadar::removeObject(RadarViewable* object) 113 { 114 // If object was added at all then remove it 115 std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it; 116 it = this->radarObjects_.find( object ); 117 if( it != this->radarObjects_.end() ) 101 118 { 102 if (!wePointer) 103 CCOUT(2) << "Cannot display a non-WorldEntitiy on the radar" << std::endl; 104 if (!this->owner_) 105 CCOUT(2) << "No owner defined" << std::endl; 106 return; 119 Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second); 120 this->radarObjects_.erase(it); 107 121 } 122 } 108 123 109 // try to find a panel already created 110 Ogre::PanelOverlayElement* panel; 111 //std::map<RadarViewable*, Ogre::PanelOverlayElement*>::iterator it = this->radarDots_.find(object); 112 if (itRadarDots_ == this->radarDots_.end()) 113 { 114 // we have to create a new entry 115 panel = static_cast<Ogre::PanelOverlayElement*>( 116 Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarDot" + getUniqueNumberString())); 117 radarDots_.push_back(panel); 118 // get right material 119 panel->setMaterialName(TextureGenerator::getMaterialName( 120 shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour())); 121 this->overlay_->add2D(panel); 122 this->itRadarDots_ = this->radarDots_.end(); 123 } 124 else 125 { 126 panel = *itRadarDots_; 127 ++itRadarDots_; 128 const std::string& materialName = TextureGenerator::getMaterialName( 129 shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour()); 130 if (materialName != panel->getMaterialName()) 131 panel->setMaterialName(materialName); 132 } 133 panel->show(); 124 void HUDRadar::objectChanged( RadarViewable* rv ) 125 { 126 assert( this->radarObjects_.find(rv) != this->radarObjects_.end() ); 127 Ogre::PanelOverlayElement* panel = this->radarObjects_[rv]; 128 panel->setMaterialName(TextureGenerator::getMaterialName( 129 shapeMaterials_[rv->getRadarObjectShape()], rv->getRadarObjectColour())); 130 } 134 131 135 // set size to fit distance... 136 float distance = (wePointer->getWorldPosition() - this->owner_->getPosition()).length(); 137 // calculate the size with 1/distance dependency for simplicity (instead of exp(-distance * lambda) 138 float size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance); 139 panel->setDimensions(size, size); 140 141 // calc position on radar... 142 Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition()); 143 coord *= Ogre::Math::PI / 3.5f; // small adjustment to make it fit the texture 144 panel->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f); 145 146 if (bIsMarked) 147 { 148 this->marker_->show(); 149 this->marker_->setDimensions(size * 1.5f, size * 1.5f); 150 this->marker_->setPosition((1.0f + coord.x - size * 1.5f) * 0.5f, (1.0f - coord.y - size * 1.5f) * 0.5f); 151 } 132 void HUDRadar::gatherObjects() 133 { 134 const std::set<RadarViewable*>& objectSet = this->getCreator()->getScene()->getRadar()->getRadarObjects(); 135 std::set<RadarViewable*>::const_iterator it; 136 for( it=objectSet.begin(); it!=objectSet.end(); ++it ) 137 this->addObject(*it); 152 138 } 153 139 154 140 void HUDRadar::radarTick(float dt) 155 141 { 156 for (itRadarDots_ = radarDots_.begin(); itRadarDots_ != radarDots_.end(); ++itRadarDots_) 157 (*itRadarDots_)->hide(); 158 this->itRadarDots_ = this->radarDots_.begin(); 159 this->marker_->hide(); 142 // Make sure the owner of the radar was defined 143 if( !this->owner_ ) 144 { 145 CCOUT(0) << "No owner defined" << std::endl; 146 assert(0); 147 } 148 149 this->marker_->hide(); // in case that no object is in focus 150 // get the focus object 151 Radar* radar = this->getOwner()->getScene()->getRadar(); 152 const RadarViewable* focusObject = radar->getFocus(); 153 154 // update the distances for all objects 155 std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it; 156 for( it = this->radarObjects_.begin(); it != this->radarObjects_.end(); ++it ) 157 { 158 // Make sure the object really is a WorldEntity 159 const WorldEntity* wePointer = it->first->getWorldEntity(); 160 if( !wePointer ) 161 { 162 CCOUT(0) << "Cannot display a non-WorldEntitiy on the radar" << std::endl; 163 assert(0); 164 } 165 bool isFocus = (it->first == focusObject); 166 // set size to fit distance... 167 float distance = (wePointer->getWorldPosition() - this->owner_->getPosition()).length(); 168 // calculate the size with 1/distance dependency for simplicity (instead of exp(-distance * lambda) 169 float size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance); 170 it->second->setDimensions(size, size); 171 172 // calc position on radar... 173 Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition()); 174 coord *= Ogre::Math::PI / 3.5f; // small adjustment to make it fit the texture 175 it->second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f); 176 it->second->show(); 177 178 // if this object is in focus, then set the focus marker 179 if (isFocus) 180 { 181 this->marker_->setDimensions(size * 1.5f, size * 1.5f); 182 this->marker_->setPosition((1.0f + coord.x - size * 1.5f) * 0.5f, (1.0f - coord.y - size * 1.5f) * 0.5f); 183 this->marker_->show(); 184 } 185 } 160 186 } 161 187 162 188 void HUDRadar::changedOwner() 163 189 { 164 190 SUPER(HUDRadar, changedOwner); 165 191 166 this->owner_ = orxonox_cast<Pawn*>(this->getOwner()); 167 } 192 this->owner_ = orxonox_cast<Pawn*>(this->getOwner()); 193 assert(this->radarObjects_.size()==0); 194 this->gatherObjects(); 168 195 } 196 } -
code/branches/presentation3/src/modules/overlays/hud/HUDRadar.h
r5781 r6942 65 65 66 66 // RadarListener interface 67 void displayObject(RadarViewable* viewable, bool bIsMarked); 67 virtual void addObject(RadarViewable* viewable); 68 virtual void removeObject(RadarViewable* viewable); 69 virtual void objectChanged( RadarViewable* rv ); 68 70 void radarTick(float dt); 71 72 void gatherObjects(); 69 73 70 74 std::map<RadarViewable::Shape, std::string> shapeMaterials_; 71 75 72 std::vector<Ogre::PanelOverlayElement*> radarDots_; 73 std::vector<Ogre::PanelOverlayElement*>::iterator itRadarDots_; 76 // std::vector<Ogre::PanelOverlayElement*> radarDots_; 77 // std::vector<Ogre::PanelOverlayElement*>::iterator itRadarDots_; 78 std::map<RadarViewable*, Ogre::PanelOverlayElement*> radarObjects_; 74 79 Ogre::PanelOverlayElement* marker_; 75 80 -
code/branches/presentation3/src/orxonox/Radar.cc
r6417 r6942 77 77 } 78 78 79 void Radar::addRadarObject(RadarViewable* rv) 80 { 81 assert( this->radarObjects_.find(rv) == this->radarObjects_.end() ); 82 this->radarObjects_.insert(rv); 83 // iterate through all radarlisteners and notify them 84 for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener) 85 { 86 (*itListener)->addObject(rv); 87 } 88 } 89 90 void Radar::removeRadarObject(RadarViewable* rv) 91 { 92 assert( this->radarObjects_.find(rv) != this->radarObjects_.end() ); 93 this->radarObjects_.erase(rv); 94 // iterate through all radarlisteners and notify them 95 for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener) 96 { 97 (*itListener)->removeObject(rv); 98 } 99 } 100 79 101 const RadarViewable* Radar::getFocus() 80 102 { … … 109 131 { 110 132 (*itListener)->radarTick(dt); 111 112 for (ObjectList<RadarViewable>::iterator itElement = ObjectList<RadarViewable>::begin(); itElement; ++itElement)113 {114 if ((*itElement)->getRadarVisibility())115 if ((*itListener)->getRadarSensitivity() > (*itElement)->getRadarObjectCamouflage())116 (*itListener)->displayObject(*itElement, *itElement == this->focus_);117 }118 133 } 119 134 } … … 188 203 } 189 204 } 205 206 void Radar::radarObjectChanged(RadarViewable* rv) 207 { 208 for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener) 209 { 210 (*itListener)->objectChanged(rv); 211 } 212 } 190 213 } -
code/branches/presentation3/src/orxonox/Radar.h
r6417 r6942 38 38 39 39 #include <map> 40 #include <set> 40 41 #include <string> 41 42 … … 48 49 class _OrxonoxExport Radar : public Tickable 49 50 { 51 friend class RadarViewable; 50 52 public: 51 53 Radar(); … … 58 60 59 61 void listObjects() const; 62 const std::set<RadarViewable*>& getRadarObjects() const 63 { return this->radarObjects_; } 60 64 61 65 void releaseFocus(); … … 66 70 67 71 void updateFocus(); 72 void addRadarObject(RadarViewable* rv); 73 void removeRadarObject(RadarViewable* rv); 74 void radarObjectChanged(RadarViewable* rv); 68 75 69 76 ObjectListIterator<RadarViewable> itFocus_; 70 77 RadarViewable* focus_; 71 78 std::map<std::string, RadarViewable::Shape> objectTypes_; 79 std::set<RadarViewable*> radarObjects_; 72 80 int objectTypeCounter_; 73 81 }; -
code/branches/presentation3/src/orxonox/controllers/HumanController.cc
r6417 r6942 35 35 #include "gametypes/Gametype.h" 36 36 #include "infos/PlayerInfo.h" 37 #include "overlays/Map.h"38 37 #include "Radar.h" 39 38 #include "Scene.h" … … 116 115 void HumanController::yaw(const Vector2& value) 117 116 { 118 //Hack to enable mouselook in map119 if ( Map::getSingletonPtr() && Map::getSingletonPtr()->getVisibility() && HumanController::localController_s->controllableEntity_->isInMouseLook() )120 {121 Map::getSingletonPtr()->rotateYaw(value);122 return;123 }124 117 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 125 118 HumanController::localController_s->controllableEntity_->rotateYaw(value); … … 128 121 void HumanController::pitch(const Vector2& value) 129 122 { 130 //Hack to enable mouselook in map131 if ( Map::getSingletonPtr() && Map::getSingletonPtr()->getVisibility() && HumanController::localController_s->controllableEntity_->isInMouseLook() )132 {133 Map::getSingletonPtr()->rotatePitch(value);134 return;135 }136 123 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 137 124 HumanController::localController_s->controllableEntity_->rotatePitch(value); -
code/branches/presentation3/src/orxonox/gamestates/GSGraphics.cc
r6417 r6942 39 39 #include "core/Game.h" 40 40 #include "core/GUIManager.h" 41 // HACK:42 #include "overlays/Map.h"43 41 44 42 namespace orxonox … … 73 71 void GSGraphics::deactivate() 74 72 { 75 // HACK: (destroys a resource smart pointer) 76 Map::hackDestroyMap(); 73 77 74 } 78 75 -
code/branches/presentation3/src/orxonox/graphics/Model.cc
r6926 r6942 120 120 setLodLevel(lodInfo->getLodLevel()); 121 121 122 COUT( 0) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and scale: "<< scaleFactor << ":" << std::endl;122 COUT(4) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and scale: "<< scaleFactor << ":" << std::endl; 123 123 124 124 #if OGRE_VERSION >= 0x010700 … … 132 132 float factor = scaleFactor*5/lodLevel_; 133 133 134 COUT( 0)<<"LodLevel set with factor: "<<factor<<std::endl;134 COUT(4)<<"LodLevel set with factor: "<<factor<<std::endl; 135 135 136 136 distList.push_back(70.0f*factor); … … 159 159 what = "<0"; 160 160 161 COUT( 0)<<"LodLevel not set because lodLevel("<<lodLevel_<<") was "<<what<<"."<<std::endl;161 COUT(4)<<"LodLevel not set because lodLevel("<<lodLevel_<<") was "<<what<<"."<<std::endl; 162 162 } 163 163 } -
code/branches/presentation3/src/orxonox/interfaces/RadarListener.h
r5781 r6942 41 41 virtual ~RadarListener() { } 42 42 43 virtual void displayObject(RadarViewable* viewable, bool bIsMarked) = 0; 43 virtual void addObject(RadarViewable* viewable) = 0; 44 virtual void removeObject(RadarViewable* viewable) = 0; 45 virtual void objectChanged(RadarViewable* viewable) = 0; 44 46 virtual float getRadarSensitivity() const = 0; 45 47 virtual void radarTick(float dt) = 0; -
code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc
r6417 r6942 29 29 #include "RadarViewable.h" 30 30 31 #include <OgreSceneManager.h>32 #include <OgreSceneNode.h>33 #include <OgreEntity.h>34 35 31 #include "util/StringUtils.h" 36 32 #include "core/CoreIncludes.h" 37 #include "tools/DynamicLines.h"38 33 #include "worldentities/WorldEntity.h" 39 34 #include "Radar.h" 40 35 #include "Scene.h" 41 #include "overlays/Map.h"42 36 43 37 namespace orxonox … … 46 40 @brief Constructor. 47 41 */ 48 RadarViewable::RadarViewable() 49 : MapNode_(NULL) 50 , MapEntity_(NULL) 51 , line_(NULL) 52 , LineNode_(NULL) 53 , isHumanShip_(false) 42 RadarViewable::RadarViewable(BaseObject* creator) 43 : isHumanShip_(false) 54 44 , bVisibility_(true) 45 , bInitialized_(false) 46 , creator_(creator) 55 47 , radarObjectCamouflage_(0.0f) 56 48 , radarObjectShape_(Dot) … … 60 52 61 53 this->uniqueId_=getUniqueNumberString(); 62 /* 63 if(Map::getSingletonPtr() && Map::getSingletonPtr()->getMapSceneManagerPtr()) 64 { 65 this->addEntity(); 66 } 67 68 */ 54 this->radar_ = this->creator_->getScene()->getRadar(); 55 this->radar_->addRadarObject(this); 56 this->bInitialized_ = true; 69 57 } 70 58 … … 72 60 RadarViewable::~RadarViewable() 73 61 { 74 if (this->isHumanShip_ && MapNode_) 75 MapNode_->removeAllChildren(); 76 77 if (MapNode_) 78 delete MapNode_; 79 80 if (MapEntity_) 81 delete MapEntity_; 82 83 if (line_) 84 delete line_; 85 86 if (LineNode_) 87 delete LineNode_; 62 if( this->bInitialized_ ) 63 this->radar_->removeRadarObject(this); 88 64 } 89 65 90 void RadarViewable::addMapEntity() 91 { //TODO Check shape and add accordantly 92 if( this->MapNode_ && !this->MapEntity_ && Map::getSingletonPtr() && Map::getSingletonPtr()->getMapSceneManagerPtr() ) 93 { 94 COUT(0) << "Adding " << this->uniqueId_ << " to Map.\n"; 95 this->MapEntity_ = Map::getSingletonPtr()->getMapSceneManagerPtr()->createEntity( this->uniqueId_, "drone.mesh"); 96 /*this->line_ = Map::getSingletonPtr()->getMapSceneManagerPtr()->createManualObject(this->uniqueId_ + "_l"); 97 this->line_->begin("Map/line_", Ogre::RenderOperation::OT_LINE_STRIP); 98 //line_->position(0, -it->getRVWorldPosition().y, 0); 99 //this->line_->position(0, -20, 0); 100 this->line_->position(0, 0, -10); //Front Arrow 101 this->line_->position(0, 0, 0); 102 103 this->line_->end(); */ 104 this->line_ = new Ogre::DynamicLines(Ogre::RenderOperation::OT_LINE_LIST); 105 this->line_->addPoint( Vector3(0,0,0) ); 106 this->line_->addPoint( Vector3(0,0,0) ); 107 108 this->MapNode_->attachObject( this->MapEntity_ ); 109 110 this->LineNode_ = this->MapNode_->createChildSceneNode(); 111 this->LineNode_->attachObject( this->line_ ); 112 } 113 else 114 { 115 COUT(0) << "Unable to load " << this->uniqueId_ << " to Map.\n"; 116 } 117 } 118 119 void RadarViewable::updateMapPosition() 120 { 121 if( this->MapNode_ ) 122 { 123 this->MapNode_->setPosition( this->getRVWorldPosition() ); 124 this->MapNode_->translate( this->getRVOrientedVelocity(), static_cast<Ogre::Node::TransformSpace>(3) ); 125 this->MapNode_->setOrientation( this->getWorldEntity()->getOrientation() ); 126 //Vector3 v = this->getRVWorldPosition(); 127 //this->line_->setPoint(1, Vector3(0,v.y,0) ); 128 this->line_->setPoint(1, Vector3( 0, static_cast<float>(static_cast<int>( -Map::getSingletonPtr()->movablePlane_->getDistance( this->getRVWorldPosition() ) ) ) ,0 )); 129 this->line_->update(); 130 if( Map::getSingletonPtr()->playerShipNode_ ) 131 this->LineNode_->setDirection( Map::getSingletonPtr()->playerShipNode_->getLocalAxes().GetColumn(1) ,Ogre::Node::TS_WORLD,Vector3::UNIT_Y); 132 } 133 } 134 135 void RadarViewable::setRadarObjectDescription(const std::string& str) 136 { 137 Radar* radar = this->getWorldEntity()->getScene()->getRadar(); 138 if (radar) 139 this->radarObjectShape_ = radar->addObjectDescription(str); 140 else 141 { 142 CCOUT(2) << "Attempting to access the radar, but the radar is non existent." << std::endl; 143 } 144 this->radarObjectDescription_ = str; 145 } 66 // void RadarViewable::setRadarObjectDescription(const std::string& str) 67 // { 68 // Radar* radar = this->getWorldEntity()->getScene()->getRadar(); 69 // if (radar) 70 // this->radarObjectShape_ = radar->addObjectDescription(str); 71 // else 72 // { 73 // CCOUT(2) << "Attempting to access the radar, but the radar is non existent." << std::endl; 74 // } 75 // this->radarObjectDescription_ = str; 76 // } 146 77 147 78 const Vector3& RadarViewable::getRVWorldPosition() const … … 167 98 } 168 99 } 100 101 void RadarViewable::settingsChanged() 102 { 103 this->radar_->radarObjectChanged(this); 104 } 169 105 } -
code/branches/presentation3/src/orxonox/interfaces/RadarViewable.h
r5781 r6942 36 36 37 37 #include "util/Math.h" 38 #include "util/OgreForwardRefs.h"39 38 #include "core/OrxonoxClass.h" 39 #include "core/SmartPtr.h" 40 40 41 41 namespace orxonox 42 42 { 43 class BaseObject; 44 43 45 /** 44 46 @brief Interface for receiving window events. … … 56 58 57 59 public: 58 RadarViewable( );60 RadarViewable(BaseObject* creator); 59 61 virtual ~RadarViewable(); 60 62 61 63 inline void setRadarObjectCamouflage(float camouflage) 62 { this->radarObjectCamouflage_ = camouflage; } 64 { 65 if( this->radarObjectCamouflage_ != camouflage ) 66 { 67 this->radarObjectCamouflage_ = camouflage; 68 this->settingsChanged(); 69 } 70 } 63 71 inline float getRadarObjectCamouflage() const 64 72 { return this->radarObjectCamouflage_; } 65 73 66 74 inline void setRadarObjectColour(const ColourValue& colour) 67 { this->radarObjectColour_ = colour; } 75 { 76 if(this->radarObjectColour_ != colour) 77 { 78 this->radarObjectColour_ = colour; 79 this->settingsChanged(); 80 } 81 } 68 82 inline const ColourValue& getRadarObjectColour() const 69 83 { return this->radarObjectColour_; } 70 84 71 void setRadarObjectDescription(const std::string& str);72 inline const std::string& getRadarObjectDescription() const73 { return this->radarObjectDescription_; }85 // void setRadarObjectDescription(const std::string& str); 86 // inline const std::string& getRadarObjectDescription() const 87 // { return this->radarObjectDescription_; } 74 88 75 89 inline void setRadarVisibility(bool b) 76 { this->bVisibility_ = b; } 90 { 91 if(b!=this->bVisibility_) 92 { 93 this->bVisibility_ = b; 94 this->settingsChanged(); 95 } 96 } 77 97 inline bool getRadarVisibility() const 78 98 { return this->bVisibility_; } … … 84 104 85 105 inline void setRadarObjectShape(Shape shape) 86 { this->radarObjectShape_ = shape; } 106 { 107 if( this->radarObjectShape_ != shape ) 108 { 109 this->radarObjectShape_ = shape; 110 this->settingsChanged(); 111 } 112 } 87 113 inline Shape getRadarObjectShape() const 88 114 { return this->radarObjectShape_; } 115 void settingsChanged(); 89 116 90 /* 91 inline void setMapNode(Ogre::SceneNode * node) 92 { this->MapNode_ = node; } 93 inline Ogre::SceneNode * getMapNode() const 94 { return this->MapNode_; } 95 inline void setMapEntity(Ogre::Entity * ent) 96 { this->MapEntity_ = ent; } 97 inline Ogre::Entity * getMapEntity() const 98 { return this->MapEntity_; } 99 */ 100 //Used for Map 101 Ogre::SceneNode * MapNode_; 102 Ogre::Entity * MapEntity_; 103 Ogre::DynamicLines* line_; 104 Ogre::SceneNode * LineNode_; 105 void addMapEntity(); 106 void updateMapPosition(); 117 107 118 bool isHumanShip_; 108 119 inline const std::string& getUniqueId() … … 115 126 void validate(const WorldEntity* object) const; 116 127 bool bVisibility_; 128 bool bInitialized_; 117 129 //Map 118 130 std::string uniqueId_; 131 BaseObject* creator_; 119 132 120 133 121 134 //Radar 135 SmartPtr<Radar> radar_; 122 136 float radarObjectCamouflage_; 123 137 Shape radarObjectShape_; -
code/branches/presentation3/src/orxonox/overlays/CMakeLists.txt
r6746 r6942 4 4 OverlayGroup.cc 5 5 6 COMPILATION_BEGIN OverlayCompilation.cc6 #COMPILATION_BEGIN OverlayCompilation.cc 7 7 InGameConsole.cc 8 Map.cc 9 COMPILATION_END 8 #COMPILATION_END 10 9 ) -
code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc
r6864 r6942 53 53 CreateFactory(Pawn); 54 54 55 Pawn::Pawn(BaseObject* creator) : ControllableEntity(creator) 55 Pawn::Pawn(BaseObject* creator) 56 : ControllableEntity(creator) 57 , RadarViewable(creator) 56 58 { 57 59 RegisterObject(Pawn);
Note: See TracChangeset
for help on using the changeset viewer.