Changeset 1916 for code/branches/objecthierarchy/src/orxonox/overlays
- Timestamp:
- Oct 14, 2008, 12:20:14 AM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox/overlays/hud
- Files:
-
- 3 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 } -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDRadar.cc
r1819 r1916 38 38 #include "core/CoreIncludes.h" 39 39 #include "core/XMLPort.h" 40 #include "objects/SpaceShip.h"41 #include "objects/WorldEntity.h"42 40 #include "objects/Radar.h" 43 41 #include "tools/TextureGenerator.h" … … 91 89 void HUDRadar::displayObject(RadarViewable* object, bool bIsMarked) 92 90 { 91 /* 93 92 const WorldEntity* wePointer = object->getWorldEntity(); 94 93 … … 100 99 return; 101 100 } 102 101 */ 103 102 // try to find a panel already created 104 103 Ogre::PanelOverlayElement* panel; … … 126 125 } 127 126 panel->show(); 128 127 /* 129 128 // set size to fit distance... 130 129 float distance = (wePointer->getWorldPosition() - SpaceShip::getLocalShip()->getPosition()).length(); … … 144 143 this->marker_->setPosition((1.0 + coord.x - size * 1.5) * 0.5, (1.0 - coord.y - size * 1.5) * 0.5); 145 144 } 145 */ 146 146 } 147 147 -
code/branches/objecthierarchy/src/orxonox/overlays/hud/HUDSpeedBar.cc
r1755 r1916 31 31 #include "HUDSpeedBar.h" 32 32 #include "core/CoreIncludes.h" 33 #include "objects/SpaceShip.h"34 33 35 34 namespace orxonox … … 49 48 void HUDSpeedBar::tick(float dt) 50 49 { 50 /* 51 51 SpaceShip* ship = SpaceShip::getLocalShip(); 52 52 if (ship) … … 57 57 this->setValue(value); 58 58 } 59 */ 59 60 } 60 61 }
Note: See TracChangeset
for help on using the changeset viewer.