Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9159 for code


Ignore:
Timestamp:
May 4, 2012, 4:09:25 PM (13 years ago)
Author:
scmoritz
Message:

3DScene added. creation of the arrow doesnt work.

Location:
code/branches/waypoints/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/waypoints/src/modules/overlays/hud/HUDNavigation.cc

    r9016 r9159  
    3636#include <OgreTextAreaOverlayElement.h>
    3737#include <OgrePanelOverlayElement.h>
     38#include <OgreEntity.h>
    3839
    3940#include "util/Math.h"
     
    8081    this->setNavMarkerSize ( 0.05f );
    8182    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);
    8287}
    8388
  • code/branches/waypoints/src/orxonox/overlays/OrxonoxOverlay.cc

    r8858 r9159  
    4242#include <OgreTechnique.h>
    4343#include <OgrePass.h>
     44#include <OgreEntity.h>
    4445
    4546#include "util/Convert.h"
     
    8384            "OrxonoxOverlay_background_" + multi_cast<std::string>(hudOverlayCounter_s++)));
    8485        this->overlay_->add2D(this->background_);
     86
     87        overlay3d_ = new Ogre::SceneNode(NULL);
     88        this->overlay_->add3D(overlay3d_);
    8589
    8690        // Get aspect ratio from the render window. Later on, we get informed automatically
     
    448452        tempTx->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour);
    449453    }
     454    void OrxonoxOverlay::add3DMesh(Ogre::Entity* entity)
     455    {
     456        this->overlay3d_->attachObject(entity);
     457    }
     458
    450459}
  • code/branches/waypoints/src/orxonox/overlays/OrxonoxOverlay.h

    r8706 r9159  
    4444#include "core/Super.h"
    4545#include "core/WindowEventListener.h"
     46
    4647
    4748namespace orxonox
     
    186187        virtual void changedOverlayGroup()
    187188            { this->changedVisibility(); }
     189        void add3DMesh(Ogre::Entity* entity);
     190
    188191
    189192    protected:
     
    195198        Ogre::Overlay* overlay_;                   //!< The overlay the entire class is about.
    196199        Ogre::PanelOverlayElement* background_;    //!< Background image (blank per default).
     200        Ogre::SceneNode* overlay3d_;                               //!< The scene where one can add 3D objects to the overlay
    197201
    198202        float windowAspectRatio_;                  //!< Screen.width / screen.height
     
    215219        OverlayGroup* group_;
    216220        Ogre::Pass* backgroundAlphaPass_;
     221
    217222  };
    218223
Note: See TracChangeset for help on using the changeset viewer.