- Timestamp:
- Oct 14, 2008, 12:20:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDNavigation.cc
r1819 r1916 41 41 #include "core/XMLPort.h" 42 42 #include "objects/Radar.h" 43 #include "objects/SpaceShip.h"44 #include "objects/Projectile.h"45 43 #include "objects/CameraHandler.h" 46 44 … … 149 147 float textLength = convertToString(dist).size() * navText_->getCharHeight() * 0.3; 150 148 149 /* 151 150 Ogre::Camera* navCam = SpaceShip::getLocalShip()->getCamera()->cam_; 152 151 Matrix4 transformationMatrix = navCam->getProjectionMatrix() * navCam->getViewMatrix(); 152 */ 153 153 // transform to screen coordinates 154 Vector3 pos = transformationMatrix *Radar::getInstance().getFocus()->getWorldPosition();154 Vector3 pos = /*transformationMatrix * */Radar::getInstance().getFocus()->getWorldPosition(); 155 155 156 156 bool outOfView; … … 224 224 { 225 225 // object is in view 226 226 /* 227 227 Vector3 aimpos = transformationMatrix * getPredictedPosition(SpaceShip::getLocalShip()->getPosition(), 228 228 Projectile::getSpeed(), Radar::getInstance().getFocus()->getWorldPosition(), Radar::getInstance().getFocus()->getOrientedVelocity()); 229 229 */ 230 230 if (wasOutOfView_) 231 231 { … … 240 240 241 241 aimMarker_->show(); 242 /* 242 243 aimMarker_->setLeft((aimpos.x + 1.0 - aimMarker_->getWidth()) * 0.5); 243 244 aimMarker_->setTop((-aimpos.y + 1.0 - aimMarker_->getHeight()) * 0.5); 244 245 */ 245 246 navText_->setLeft((pos.x + 1.0 + navMarker_->getWidth()) * 0.5); 246 247 navText_->setTop((-pos.y + 1.0 + navMarker_->getHeight()) * 0.5); … … 250 251 float HUDNavigation::getDist2Focus() const 251 252 { 253 /* 252 254 if (Radar::getInstance().getFocus()) 253 255 return (Radar::getInstance().getFocus()->getWorldPosition() - SpaceShip::getLocalShip()->getPosition()).length(); 254 256 else 257 */ 255 258 return 0; 256 259 }
Note: See TracChangeset
for help on using the changeset viewer.