Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 26, 2008, 2:13:17 PM (16 years ago)
Author:
rgrieder
Message:

merged hud branch back to trunk

Location:
code/trunk/src/orxonox
Files:
3 deleted
14 edited
34 copied

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/CMakeLists.txt

    r1612 r1625  
    33  Main.cc
    44  Orxonox.cc
     5  Radar.cc
     6  RadarListener.cc
     7  RadarViewable.cc
    58  Settings.cc
    69
    7   console/InGameConsole.cc
    8   hud/HUD.cc
    9   hud/BarOverlayElement.cc
    10   hud/RadarOverlayElement.cc
    11   hud/RadarObject.cc
    12   hud/Navigation.cc
     10  overlays/OrxonoxOverlay.cc
     11  overlays/OverlayGroup.cc
     12  overlays/OverlayText.cc
     13
     14  overlays/console/InGameConsole.cc
     15
     16  overlays/debug/DebugFPSText.cc
     17  overlays/debug/DebugRTRText.cc
     18
     19  overlays/hud/HUDBar.cc
     20  overlays/hud/HUDNavigation.cc
     21  overlays/hud/HUDRadar.cc
     22  overlays/hud/HUDSpeedBar.cc
     23
    1324  tolua/tolua_bind.cc
    1425
     
    1728  tools/Mesh.cc
    1829  tools/ParticleInterface.cc
     30  tools/TextureGenerator.cc
    1931  tools/Timer.cc
     32  tools/WindowEventListener.cc
    2033
    2134  objects/Ambient.cc
     
    3649  objects/RotatingProjectile.cc
    3750  objects/ParticleProjectile.cc
    38 
    39 #  objects/weapon/AmmunitionDump.cc
    40 #  objects/weapon/BarrelGun.cc
    41 #  objects/weapon/BaseWeapon.cc
    42 #  objects/weapon/Bullet.cc
    43 #  objects/weapon/BulletManager.cc
    44 #  objects/weapon/WeaponStation.cc
    4551)
    4652
  • code/trunk/src/orxonox/GraphicsEngine.cc

    r1564 r1625  
    5050#include "core/CommandExecutor.h"
    5151#include "core/ConsoleCommand.h"
    52 #include "core/input/InputManager.h"
    53 
    54 #include "console/InGameConsole.h"
    55 #include "hud/HUD.h"
     52
     53#include "overlays/console/InGameConsole.h"
     54#include "overlays/OverlayGroup.h"
    5655#include "tools/ParticleInterface.h"
    5756#include "Settings.h"
    58 
    59 
    60 namespace orxonox {
     57#include "tools/WindowEventListener.h"
     58
     59
     60namespace orxonox
     61{
    6162  /**
    6263    @brief Returns the singleton instance and creates it the first time.
     
    435436
    436437  /**
    437   * Window has resized.
     438  * Window has moved.
    438439  * @param rw The render window it occured in
    439440  */
    440441  void GraphicsEngine::windowMoved(Ogre::RenderWindow *rw)
    441442  {
    442     // note: this doesn't change the window extents
     443    for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     444      it->windowMoved();
    443445  }
    444446
     
    451453  void GraphicsEngine::windowResized(Ogre::RenderWindow *rw)
    452454  {
    453     // change the mouse clipping size for absolute mouse movements
    454     int w = rw->getWidth();
    455     int h = rw->getHeight();
    456     InputManager::setWindowExtents(w, h);
    457     InGameConsole::getInstance().resize();
    458     HUD::getSingleton().resize();
    459   }
    460 
    461   /**
    462   * Window has resized.
     455    for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     456      it->windowResized(this->renderWindow_->getWidth(), this->renderWindow_->getHeight());
     457  }
     458
     459  /**
     460  * Window has changed Focus.
    463461  * @param rw The render window it occured in
    464462  */
    465463  void GraphicsEngine::windowFocusChanged(Ogre::RenderWindow *rw)
    466464  {
    467     // note: this doesn't change the window extents
    468   }
    469 
    470   /**
    471   * Window has resized.
     465    for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     466      it->windowFocusChanged();
     467  }
     468
     469  /**
     470  * Window was closed.
    472471  * @param rw The render window it occured in
    473472  */
    474473  void GraphicsEngine::windowClosed(Ogre::RenderWindow *rw)
    475474  {
    476     // using CommandExecutor in order to avoid depending on Orxonox class.
     475    // using CommandExecutor in order to avoid depending on Orxonox.h.
    477476    CommandExecutor::execute("exit", false);
    478477  }
  • code/trunk/src/orxonox/GraphicsEngine.h

    r1563 r1625  
    4747
    4848
    49 namespace orxonox {
    50 
     49namespace orxonox
     50{
    5151    /**
    5252    @brief Graphics engine manager class
     
    7272            int getWindowHeight() const;
    7373            float getWindowAspectRatio() const;
    74             float getAverageFPS() const
    75             { if (renderWindow_) return this->renderWindow_->getAverageFPS(); else return 0.0f; }
     74            float getAverageFramesPerSecond() const { return this->avgFramesPerSecond_; }
     75            float getAverageTickTime() const { return this->avgTickTime_; }
     76            void setAverageTickTime(float tickTime) { this->avgTickTime_ = tickTime; }
     77            void setAverageFramesPerSecond(float fps) { this->avgFramesPerSecond_ = fps; }
     78
     79            void setWindowActivity(bool activity)
     80            { if (this->renderWindow_) this->renderWindow_->setActive(activity); }
    7681
    7782            void windowMoved       (Ogre::RenderWindow* rw);
     
    108113            int                 ogreLogLevelCritical_;  //!< Corresponding Orxonx debug level for LL_CRITICAL
    109114            unsigned int        detailLevelParticle_;   //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high)
     115            float               avgTickTime_;           //!< time in ms to tick() one frame
     116            float               avgFramesPerSecond_;    //!< number of frames processed in one second
    110117    };
    111118}
  • code/trunk/src/orxonox/Orxonox.cc

    r1608 r1625  
    6969
    7070// objects and tools
    71 #include "hud/HUD.h"
    72 #include "console/InGameConsole.h"
     71#include "overlays/OverlayGroup.h"
     72#include "overlays/console/InGameConsole.h"
    7373#include "objects/Tickable.h"
    7474#include "objects/Backlight.h"
     
    7777#include "GraphicsEngine.h"
    7878#include "Settings.h"
     79#include "Radar.h"
    7980
    8081// globals for the server or client
     
    9697   * Create a new instance of Orxonox. Avoid doing any actual work here.
    9798   */
    98   Orxonox::Orxonox() :
    99     ogre_(0),
    100     //auMan_(0),
    101     timer_(0),
    102     // turn on frame smoothing by setting a value different from 0
    103     frameSmoothingTime_(0.0f),
    104     orxonoxHUD_(0),
    105     bAbort_(false),
    106     timefactor_(1.0f),
    107     mode_(STANDALONE),
    108     serverIp_(""),
    109     serverPort_(NETWORK_PORT)
     99  Orxonox::Orxonox()
     100    : ogre_(0)
     101    , startLevel_(0)
     102    , hud_(0)
     103    , radar_(0)
     104    //, auMan_(0)
     105    , timer_(0)
     106    , bAbort_(false)
     107    , timefactor_(1.0f)
     108    , mode_(STANDALONE)
     109    , serverIp_("")
     110    , serverPort_(NETWORK_PORT)
    110111  {
    111112  }
     
    117118  {
    118119    // keep in mind: the order of deletion is very important!
    119     this->orxonoxHUD_->destroy();
     120    Loader::unload(startLevel_);
     121    if (this->startLevel_)
     122      delete this->startLevel_;
     123
     124    Loader::unload(hud_);
     125    if (this->hud_)
     126      delete this->hud_;
     127
     128    if (this->radar_)
     129      delete this->radar_;
     130
    120131    Loader::close();
    121     InputManager::destroy();
    122132    //if (this->auMan_)
    123133    //  delete this->auMan_;
     
    125135    if (this->timer_)
    126136      delete this->timer_;
     137    InputManager::destroy();
    127138    GraphicsEngine::getSingleton().destroy();
    128139
     
    335346
    336347    // Load the HUD
    337     COUT(3) << "Orxonox: Loading HUD..." << std::endl;
    338     orxonoxHUD_ = &HUD::getSingleton();
    339     orxonoxHUD_->initialise();
     348    COUT(3) << "Orxonox: Loading HUD" << std::endl;
     349    hud_ = new Level(Settings::getDataPath() + "overlay/hud.oxo");
     350    Loader::load(hud_);
     351
     352    // Start the Radar
     353    this->radar_ = new Radar();
    340354
    341355    return true;
     
    398412  bool Orxonox::loadScene()
    399413  {
    400     Level* startlevel = new Level("levels/sample.oxw");
    401     Loader::open(startlevel);
     414    startLevel_ = new Level("levels/sample.oxw");
     415    Loader::open(startLevel_);
    402416
    403417    return true;
     
    424438
    425439
    426     // Contains the times of recently fired events
    427     // eventTimes[4] is the list for the times required for the fps counter
    428     std::deque<unsigned long> eventTimes[3];
    429     // Clear event times
    430     for (int i = 0; i < 3; ++i)
    431       eventTimes[i].clear();
    432 
    433440    // use the ogre timer class to measure time.
    434441    if (!timer_)
    435442      timer_ = new Ogre::Timer();
     443
     444    unsigned long frameCount = 0;
     445   
     446    // TODO: this would very well fit into a configValue
     447    const unsigned long refreshTime = 200000;
     448    unsigned long refreshStartTime = 0;
     449    unsigned long tickTime = 0;
     450    unsigned long oldFrameCount = 0;
     451
     452    unsigned long timeBeforeTick = 0;
     453    unsigned long timeBeforeTickOld = 0;
     454    unsigned long timeAfterTick = 0;
     455
     456    COUT(3) << "Orxonox: Starting the main loop." << std::endl;
     457
    436458    timer_->reset();
    437 
    438     float renderTime = 0.0f;
    439     float frameTime = 0.0f;
    440 //    clock_t time = 0;
    441 
    442     //Ogre::SceneManager* mSceneMgr = GraphicsEngine::getSingleton().getSceneManager();
    443     //Ogre::Viewport* mViewport = mSceneMgr->getCurrentViewport();
    444 
    445     //Ogre::CompositorManager::getSingleton().addCompositor(mViewport, "Bloom");
    446     //Ogre::CompositorManager::getSingleton().addCompositor(mViewport, "MotionBlur");
    447 
    448     COUT(3) << "Orxonox: Starting the main loop." << std::endl;
    449459    while (!bAbort_)
    450460    {
    451461      // get current time
    452       unsigned long now = timer_->getMilliseconds();
    453 
    454       // create an event to pass to the frameStarted method in ogre
    455       Ogre::FrameEvent evt;
    456       evt.timeSinceLastEvent = calculateEventTime(now, eventTimes[0]);
    457       evt.timeSinceLastFrame = calculateEventTime(now, eventTimes[1]);
    458       frameTime += evt.timeSinceLastFrame;
    459 
    460       // show the current time in the HUD
    461       // HUD::getSingleton().setTime(now);
    462       if (mode_ != DEDICATED && frameTime > 0.4f)
    463       {
    464         HUD::getSingleton().setRenderTimeRatio(renderTime / frameTime);
    465         frameTime = 0.0f;
    466         renderTime = 0.0f;
    467       }
    468 
    469       // tick the core
    470       Core::tick((float)evt.timeSinceLastFrame);
     462      timeBeforeTickOld = timeBeforeTick;
     463      timeBeforeTick    = timer_->getMicroseconds();
     464      float dt = (timeBeforeTick - timeBeforeTickOld) / 1000000.0;
     465
     466
     467      // tick the core (needs real time for input and tcl thread management)
     468      Core::tick(dt);
     469
    471470      // Call those objects that need the real time
    472471      for (Iterator<TickableReal> it = ObjectList<TickableReal>::start(); it; ++it)
    473         it->tick((float)evt.timeSinceLastFrame);
     472        it->tick(dt);
    474473      // Call the scene objects
    475474      for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
    476         it->tick((float)evt.timeSinceLastFrame * this->timefactor_);
    477       //AudioManager::tick();
     475        it->tick(dt * this->timefactor_);
     476
     477      // call server/client with normal dt
    478478      if (client_g)
    479         client_g->tick((float)evt.timeSinceLastFrame);
     479        client_g->tick(dt * this->timefactor_);
    480480      if (server_g)
    481         server_g->tick((float)evt.timeSinceLastFrame);
     481        server_g->tick(dt * this->timefactor_);
     482
     483
     484      // get current time once again
     485      timeAfterTick = timer_->getMicroseconds();
     486
     487      tickTime += timeAfterTick - timeBeforeTick;
     488      if (timeAfterTick > refreshStartTime + refreshTime)
     489      {
     490        GraphicsEngine::getSingleton().setAverageTickTime(
     491            (float)tickTime * 0.001 / (frameCount - oldFrameCount));
     492        GraphicsEngine::getSingleton().setAverageFramesPerSecond(
     493            (float)(frameCount - oldFrameCount) / (timeAfterTick - refreshStartTime) * 1000000.0);
     494        oldFrameCount = frameCount;
     495        tickTime = 0;
     496        refreshStartTime = timeAfterTick;
     497      }
     498
    482499
    483500      // don't forget to call _fireFrameStarted in ogre to make sure
    484501      // everything goes smoothly
     502      Ogre::FrameEvent evt;
     503      evt.timeSinceLastFrame = dt;
     504      evt.timeSinceLastEvent = dt; // note: same time, but shouldn't matter anyway
    485505      ogreRoot._fireFrameStarted(evt);
    486 
    487       // get current time
    488       now = timer_->getMilliseconds();
    489       calculateEventTime(now, eventTimes[2]);
    490506
    491507      if (mode_ != DEDICATED)
     
    494510        // This calls the WindowEventListener objects.
    495511        Ogre::WindowEventUtilities::messagePump();
     512        // make sure the window stays active even when not focused
     513        // (probably only necessary on windows)
     514        GraphicsEngine::getSingleton().setWindowActivity(true);
    496515
    497516        // render
     
    499518      }
    500519
    501       // get current time
    502       now = timer_->getMilliseconds();
    503 
    504       // create an event to pass to the frameEnded method in ogre
    505       evt.timeSinceLastEvent = calculateEventTime(now, eventTimes[0]);
    506       renderTime += calculateEventTime(now, eventTimes[2]);
    507 
    508520      // again, just to be sure ogre works fine
    509       ogreRoot._fireFrameEnded(evt);
    510       //msleep(500);
     521      ogreRoot._fireFrameEnded(evt); // note: uses the same time as _fireFrameStarted
     522
     523      ++frameCount;
    511524    }
    512525
     
    518531    return true;
    519532  }
    520 
    521   /**
    522     Method for calculating the average time between recently fired events.
    523     Code directly taken from OgreRoot.cc
    524     @param now The current time in ms.
    525     @param type The type of event to be considered.
    526   */
    527   float Orxonox::calculateEventTime(unsigned long now, std::deque<unsigned long> &times)
    528   {
    529     // Calculate the average time passed between events of the given type
    530     // during the last frameSmoothingTime_ seconds.
    531 
    532     times.push_back(now);
    533 
    534     if(times.size() == 1)
    535       return 0;
    536 
    537     // Times up to frameSmoothingTime_ seconds old should be kept
    538     unsigned long discardThreshold = (unsigned long)(frameSmoothingTime_ * 1000.0f);
    539 
    540     // Find the oldest time to keep
    541     std::deque<unsigned long>::iterator it  = times.begin();
    542     // We need at least two times
    543     std::deque<unsigned long>::iterator end = times.end() - 2;
    544 
    545     while(it != end)
    546     {
    547       if (now - *it > discardThreshold)
    548         ++it;
    549       else
    550         break;
    551     }
    552 
    553     // Remove old times
    554     times.erase(times.begin(), it);
    555 
    556     return (float)(times.back() - times.front()) / ((times.size() - 1) * 1000);
    557   }
    558533}
  • code/trunk/src/orxonox/Orxonox.h

    r1563 r1625  
    6262
    6363      void abortRequest();
    64       //inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
    6564
    6665      static Orxonox* getSingleton();
     
    9392    private:
    9493      GraphicsEngine*       ogre_;          //!< our dearest graphics engine <3
     94      Level*                startLevel_;    //!< current hard coded default level
     95      Level*                hud_;           //!< 'level' object fo the HUD
     96      Radar*                radar_;         //!< represents the Radar (not the HUD part)
    9597      //audio::AudioManager*  auMan_;         //!< audio manager
    9698      Ogre::Timer*          timer_;         //!< Main loop timer
    97       // TODO: make this a config-value by creating a config class for orxonox
    98       float                 frameSmoothingTime_;
    99       HUD*                  orxonoxHUD_;
    10099      bool                  bAbort_;        //!< aborts the render loop if true
    101100      float                 timefactor_;    //!< A factor to change the gamespeed
  • code/trunk/src/orxonox/OrxonoxPrereqs.h

    r1564 r1625  
    6262namespace orxonox
    6363{
    64   namespace LODParticle
    65   {
    66     enum LOD
     64    namespace LODParticle
    6765    {
    68       off = 0,
    69       low = 1,
    70       normal = 2,
    71       high = 3
    72     };
    73   }
     66        enum LOD
     67        {
     68            off = 0,
     69            low = 1,
     70            normal = 2,
     71            high = 3
     72        };
     73    }
    7474
    75   class GraphicsEngine;
    76   class Orxonox;
     75    class GraphicsEngine;
     76    class Orxonox;
    7777
    78   // objects
    79   class Ambient;
    80   class Backlight;
    81   class Camera;
    82   class Fighter;
    83   class Model;
    84   class NPC;
    85   class ParticleSpawner;
    86   class Skybox;
    87   class SpaceShip;
    88   class SpaceShipAI;
    89   class WorldEntity;
     78    class RadarViewable;
     79    class Radar;
     80    class RadarListener;
    9081
    91   class Projectile;
    92   class BillboardProjectile;
    93   class RotatingProjectile;
    94   class ParticleProjectile;
     82    // objects
     83    class Ambient;
     84    class Backlight;
     85    class Camera;
     86    class Fighter;
     87    class Model;
     88    class NPC;
     89    class ParticleSpawner;
     90    class Skybox;
     91    class SpaceShip;
     92    class SpaceShipAI;
     93    class WorldEntity;
    9594
    96   class AmmunitionDump;
    97   class Bullet;
    98   class BulletManager;
    99   class BaseWeapon;
    100   class BarrelGun;
    101   class WeaponStation;
     95    class Projectile;
     96    class BillboardProjectile;
     97    class RotatingProjectile;
     98    class ParticleProjectile;
    10299
    103   // tools
    104   class BillboardSet;
    105   class Light;
    106   class Mesh;
    107   template <class T>
    108   class Timer;
    109   class TimerBase;
     100    // tools
     101    class BillboardSet;
     102    class Light;
     103    class Mesh;
     104    class ParticleInterface;
     105    template <class T>
     106    class Timer;
    110107
    111   // particle
    112   class ParticleInterface;
    113 
    114   // hud
    115   class BarOverlayElement;
    116   class BarOverlayElementFactory;
    117   class HUD;
    118   class Navigation;
    119   class RadarObject;
    120   class RadarOverlayElement;
    121   class RadarOverlayElementFactory;
    122 
    123   //console
    124   class InGameConsole;
     108    // overlays
     109    class BarColour;
     110    class DebugFPSText;
     111    class DebugRTRText;
     112    class HUDBar;
     113    class HUDNavigation;
     114    class HUDRadar;
     115    class HUDSpeedBar;
     116    class InGameConsole;
     117    class OrxonoxOverlay;
     118    class OverlayGroup;
     119    class OverlayText;
    125120}
    126121
     122namespace Ogre
     123{
     124    // some got forgotten in OgrePrerequisites
     125    class BorderPanelOverlayElement;
     126    class PanelOverlayElement;
     127    class TextAreaOverlayElement;
     128}
    127129
    128130#endif /* _OrxonoxPrereqs_H__ */
  • code/trunk/src/orxonox/objects/Ambient.cc

    r1505 r1625  
    7373     
    7474    }
    75    
    76     void Ambient::loadParams(TiXmlElement* xmlElem)
     75
     76    void Ambient::setAmbientLight(const ColourValue& colour)
    7777    {
    78         if (xmlElem->Attribute("colourvalue"))
    79         {
    80         SubString colourvalues(xmlElem->Attribute("colourvalue"), ',');
    81 
    82                 float r, g, b;
    83         convertValue<std::string, float>(&r, colourvalues[0]);
    84         convertValue<std::string, float>(&g, colourvalues[1]);
    85         convertValue<std::string, float>(&b, colourvalues[2]);
    86 
    87                 this->setAmbientLight(ColourValue(r, g, b));
    88 
    89                 COUT(4) << "Loader: Set ambient light: "<<r<<" " << g << " " << b  << std::endl << std::endl;
    90         }
    91    }
    92 
    93    void Ambient::setAmbientLight(const ColourValue& colour)
    94    {
    95         GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
     78            GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
    9679      ambientLight_=colour;     
    97    }
     80    }
    9881
    9982    /**
  • code/trunk/src/orxonox/objects/Ambient.h

    r1505 r1625  
    4444            virtual ~Ambient();
    4545
    46             void loadParams(TiXmlElement* xmlElem);
    4746            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4847            void setAmbientLight(const ColourValue& colour);
  • code/trunk/src/orxonox/objects/NPC.cc

    r1505 r1625  
    4545  NPC::~NPC()
    4646  {
    47   }
    48 
    49   void NPC::loadParams(TiXmlElement* xmlElem)
    50   {
    51     Model::loadParams(xmlElem);
    5247  }
    5348
  • code/trunk/src/orxonox/objects/NPC.h

    r1505 r1625  
    4848      NPC();
    4949      virtual ~NPC();
    50       virtual void loadParams(TiXmlElement* xmlElem);
    5150      void tick(float dt);
    5251      void update();
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1608 r1625  
    4343#include "core/XMLPort.h"
    4444#include "core/ConsoleCommand.h"
    45 #include "core/input/InputManager.h"
    4645
    4746#include "network/Client.h"
    4847
    49 #include "hud/HUD.h"
    5048#include "tools/ParticleInterface.h"
    5149
     
    118116        this->timeToReload_ = 0;
    119117
    120         this->setMouseEventCallback_ = false;
    121118        this->bLMousePressed_ = false;
    122119        this->bRMousePressed_ = false;
    123120        this->mouseXRotation_ = 0;
    124121        this->mouseYRotation_ = 0;
    125         this->mouseX_ = 0;
    126         this->mouseY_ = 0;
    127122        this->myShip_ = false;
    128123
     
    142137        this->teamNr_ = 0;
    143138        this->health_ = 100;
     139
     140        this->radarObject_ = static_cast<WorldEntity*>(this);
    144141    }
    145142
     
    161158                delete this->backlight_;
    162159
    163             if (this->setMouseEventCallback_)
    164                 InputManager::removeMouseHandler("SpaceShip");
    165 
    166160            if (this->cam_)
    167161                delete this->cam_;
    168 
    169             if (!this->myShip_)
    170                 HUD::getSingleton().removeRadarObject(this);
    171162        }
    172163    }
     
    177168          myShip_=true;
    178169        else
    179           HUD::getSingleton().addRadarObject(this, this->getProjectileColour());
     170          this->setRadarObjectColour(this->getProjectileColour());
    180171      }
    181172      if(Model::create())
     
    418409
    419410        currentDir_ = getOrientation()*initialDir_;
    420                 currentOrth_ = getOrientation()*initialOrth_;
     411        currentOrth_ = getOrientation()*initialOrth_;
    421412
    422413        if (this->cam_)
  • code/trunk/src/orxonox/objects/SpaceShip.h

    r1608 r1625  
    3636#include "Camera.h"
    3737#include "Model.h"
     38#include "RadarViewable.h"
    3839#include "tools/BillboardSet.h"
    3940
    4041namespace orxonox
    4142{
    42     class _OrxonoxExport SpaceShip : public Model
     43    class _OrxonoxExport SpaceShip : public Model, public RadarViewable
    4344    {
    4445        public:
     
    131132            Vector3 currentOrth_;
    132133            bool bInvertYAxis_;
    133             bool setMouseEventCallback_;
    134134            bool bLMousePressed_;
    135135            bool bRMousePressed_;
  • code/trunk/src/orxonox/objects/WorldEntity.cc

    r1602 r1625  
    9595    }
    9696
    97     void WorldEntity::loadParams(TiXmlElement* xmlElem)
    98     {
    99 
    100         BaseObject::loadParams(xmlElem);
    101         create();
    102     }
    103 
    10497
    10598    void WorldEntity::setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll)
  • code/trunk/src/orxonox/objects/WorldEntity.h

    r1602 r1625  
    5151
    5252            virtual void tick(float dt);
    53             virtual void loadParams(TiXmlElement* xmlElem);
    5453            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5554            virtual inline bool create(){ return Synchronisable::create(); }
     
    7473            inline const Vector3& getPosition() const
    7574                { return this->node_->getPosition(); }
     75            inline const Vector3& getWorldPosition() const
     76                { return this->node_->getWorldPosition(); }
    7677
    7778            inline void translate(const Vector3& d, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
     
    101102            inline const Ogre::Quaternion& getOrientation()
    102103              { return this->node_->getOrientation(); }
     104            inline const Ogre::Quaternion& getWorldOrientation()
     105              { return this->node_->getWorldOrientation(); }
    103106            inline void setOrientation(const Ogre::Quaternion& quat)
    104107              { this->node_->setOrientation(quat); }
  • code/trunk/src/orxonox/overlays/OrxonoxOverlay.h

    r1624 r1625  
    7676
    7777        //! Shows the overlay with an detour to BaseObject::visibility_
    78         void show() { this->setVisibility(true); }
     78        void show() { this->setVisible(true); }
    7979        //! Hides the overlay with an detour to BaseObject::visibility_
    80         void hide() { this->setVisibility(false); }
     80        void hide() { this->setVisible(false); }
    8181
    8282        /** Sets whether the aspect of the overlay is corrected.
  • code/trunk/src/orxonox/overlays/OverlayGroup.cc

    r1624 r1625  
    138138        {
    139139            if ((*it)->getName() == name)
    140                 (*it)->setVisibility(!((*it)->isVisible()));
     140                (*it)->setVisible(!((*it)->isVisible()));
    141141        }
    142142    }
  • code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc

    r1624 r1625  
    9797
    9898            // hide at first
    99             this->setVisibility(false);
     99            this->setVisible(false);
    100100        }
    101101
Note: See TracChangeset for help on using the changeset viewer.