Changeset 9159 for code/branches
- Timestamp:
- May 4, 2012, 4:09:25 PM (13 years ago)
- Location:
- code/branches/waypoints/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/waypoints/src/modules/overlays/hud/HUDNavigation.cc
r9016 r9159 36 36 #include <OgreTextAreaOverlayElement.h> 37 37 #include <OgrePanelOverlayElement.h> 38 #include <OgreEntity.h> 38 39 39 40 #include "util/Math.h" … … 80 81 this->setNavMarkerSize ( 0.05f ); 81 82 this->setDetectionLimit( 10000.0f ); 83 84 Ogre::Entity* ent = this->getScene()->getSceneManager()->createEntity("Arrow3D", "Arrow3D.mesh"); 85 this->add3DMesh(ent); 86 this->overlay3d_->setPosition(0, 0, -10); 82 87 } 83 88 -
code/branches/waypoints/src/orxonox/overlays/OrxonoxOverlay.cc
r8858 r9159 42 42 #include <OgreTechnique.h> 43 43 #include <OgrePass.h> 44 #include <OgreEntity.h> 44 45 45 46 #include "util/Convert.h" … … 83 84 "OrxonoxOverlay_background_" + multi_cast<std::string>(hudOverlayCounter_s++))); 84 85 this->overlay_->add2D(this->background_); 86 87 overlay3d_ = new Ogre::SceneNode(NULL); 88 this->overlay_->add3D(overlay3d_); 85 89 86 90 // Get aspect ratio from the render window. Later on, we get informed automatically … … 448 452 tempTx->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour); 449 453 } 454 void OrxonoxOverlay::add3DMesh(Ogre::Entity* entity) 455 { 456 this->overlay3d_->attachObject(entity); 457 } 458 450 459 } -
code/branches/waypoints/src/orxonox/overlays/OrxonoxOverlay.h
r8706 r9159 44 44 #include "core/Super.h" 45 45 #include "core/WindowEventListener.h" 46 46 47 47 48 namespace orxonox … … 186 187 virtual void changedOverlayGroup() 187 188 { this->changedVisibility(); } 189 void add3DMesh(Ogre::Entity* entity); 190 188 191 189 192 protected: … … 195 198 Ogre::Overlay* overlay_; //!< The overlay the entire class is about. 196 199 Ogre::PanelOverlayElement* background_; //!< Background image (blank per default). 200 Ogre::SceneNode* overlay3d_; //!< The scene where one can add 3D objects to the overlay 197 201 198 202 float windowAspectRatio_; //!< Screen.width / screen.height … … 215 219 OverlayGroup* group_; 216 220 Ogre::Pass* backgroundAlphaPass_; 221 217 222 }; 218 223
Note: See TracChangeset
for help on using the changeset viewer.