Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1392 for code


Ignore:
Timestamp:
May 23, 2008, 4:38:02 PM (16 years ago)
Author:
FelixSchulthess
Message:

moved #includes to .cc from .h where possible

Location:
code/trunk/src/orxonox/hud
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/hud/BarOverlayElement.cc

    r1362 r1392  
    2727
    2828#include <OgreOverlayManager.h>
    29 #include <OgreOverlayElement.h>
    30 #include <OgrePanelOverlayElement.h>
    3129#include "GraphicsEngine.h"
    3230#include "BarOverlayElement.h"
     
    3634  using namespace Ogre;
    3735
    38     BarOverlayElement::BarOverlayElement(const String& name):Ogre::PanelOverlayElement(name){
     36    BarOverlayElement::BarOverlayElement(const String& name):PanelOverlayElement(name){
    3937        name_ = name;
    4038    }
     
    4240    BarOverlayElement::~BarOverlayElement(){}
    4341
    44     void BarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container){
     42    void BarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, OverlayContainer* container){
    4543        // init some values...
    4644        container_ = container;
    47         om = &Ogre::OverlayManager::getSingleton();
     45        om = &OverlayManager::getSingleton();
    4846        value_ = 0;
    4947        color_ = 2;
     
    5351        topRel_ = topRel;
    5452        dimRel_ = dimRel;
    55        
     53
    5654        // create background...
    5755        background_ = static_cast<OverlayContainer*>(om->createOverlayElement("Panel", name_+"container"));
    5856        background_->show();
    5957        container_->addChild(background_);
    60         background_->setMetricsMode(Ogre::GMM_PIXELS);
     58        background_->setMetricsMode(GMM_PIXELS);
    6159        background_->setMaterialName("Orxonox/BarBackground");
    6260
     
    6563
    6664        show();
    67         setMetricsMode(Ogre::GMM_PIXELS);
     65        setMetricsMode(GMM_PIXELS);
    6866        setMaterialName("Orxonox/Green");
    6967        background_->addChild(this);
  • code/trunk/src/orxonox/hud/BarOverlayElement.h

    r1362 r1392  
    3030#define _BAR_H__
    3131
    32 #include <OgreOverlayManager.h>
    33 #include <OgreOverlayElement.h>
     32
    3433#include <OgrePanelOverlayElement.h>
    35 
    3634#include <OgrePrerequisites.h>
    3735#include "../OrxonoxPrereqs.h"
    38 
    39 
    4036
    4137namespace orxonox
  • code/trunk/src/orxonox/hud/HUD.cc

    r1388 r1392  
    2626*/
    2727
    28 
     28#include <string.h>
    2929#include "OrxonoxStableHeaders.h"
    3030#include <OgreOverlay.h>
    3131#include <OgreOverlayContainer.h>
    3232#include <OgreOverlayManager.h>
    33 #include <OgreSceneNode.h>
    34 #include <OgreEntity.h>
    3533#include <OgreStringConverter.h>
     34
    3635#include "core/Debug.h"
     36#include "core/ConsoleCommand.h"
    3737#include "objects/SpaceShip.h"
    38 #include "HUD.h"
    3938#include "BarOverlayElement.h"
    4039#include "RadarOverlayElement.h"
    4140#include "OverlayElementFactories.h"
     41#include "HUD.h"
    4242
    4343namespace orxonox
  • code/trunk/src/orxonox/hud/HUD.h

    r1388 r1392  
    3030#define _HUD_H__
    3131
    32 #include <string.h>
    33 #include <OgreOverlayElement.h>
     32#include <OgrePrerequisites.h>
    3433#include <OgreTextAreaOverlayElement.h>
    35 #include <OgrePrerequisites.h>
    36 
    3734#include "OrxonoxPrereqs.h"
    3835#include "core/Tickable.h"
  • code/trunk/src/orxonox/hud/RadarObject.cc

    r1362 r1392  
    2626*/
    2727
     28#include <string.h>
     29#include <OgreOverlayManager.h>
     30#include <OgrePanelOverlayElement.h>
     31#include <OgreStringConverter.h>
     32#include <util/Math.h>
    2833#include "RadarObject.h"
    2934
     
    3439        int RadarObject::count = 0;             // initialize static variable
    3540
    36         RadarObject::RadarObject(Ogre::OverlayContainer* container){
     41        RadarObject::RadarObject(OverlayContainer* container){
    3742                container_ = container;
    3843                pos_ = Vector3(0.0, 0.0, 0.0);
     
    4045        }
    4146
    42         RadarObject::RadarObject(Ogre::OverlayContainer* container, Vector3 pos){
     47        RadarObject::RadarObject(OverlayContainer* container, Vector3 pos){
    4348                container_ = container;
    4449                pos_ = pos;
     
    5055        void RadarObject::init(){
    5156            next = NULL;
    52                 om = &Ogre::OverlayManager::getSingleton();
     57                om = &OverlayManager::getSingleton();
    5358                panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel",
    54                         "Object"+Ogre::StringConverter::toString(count)));
     59                        "Object"+StringConverter::toString(count)));
    5560                panel_->setMaterialName("Orxonox/RedDot");
    5661                panel_->setDimensions(3,3);
  • code/trunk/src/orxonox/hud/RadarObject.h

    r1362 r1392  
    2929#define _RADAR2_H__
    3030
    31 #include <string.h>
    3231#include <OgrePrerequisites.h>
    33 #include <OgreOverlayManager.h>
    34 #include <OgreOverlayElement.h>
    35 #include <OgrePanelOverlayElement.h>
    36 #include <OgreStringConverter.h>
    37 
    38 #include <util/Math.h>
    3932#include "../OrxonoxPrereqs.h"
    4033
  • code/trunk/src/orxonox/hud/RadarOverlayElement.cc

    r1387 r1392  
    2525*
    2626*/
    27 
     27#include <string.h>
     28
     29
     30#include <string.h>
     31#include <OgreOverlayManager.h>
     32#include <OgreStringConverter.h>
     33#include <OgrePanelOverlayElement.h>
     34
     35#include "GraphicsEngine.h"
     36#include "core/Tickable.h"
     37#include "core/ConsoleCommand.h"
     38#include "objects/SpaceShip.h"
    2839#include "RadarOverlayElement.h"
    2940
     
    3344    using namespace Ogre;
    3445
    35     RadarOverlayElement::RadarOverlayElement(const String& name):Ogre::PanelOverlayElement(name){
     46    RadarOverlayElement::RadarOverlayElement(const String& name):PanelOverlayElement(name){
    3647    }
    3748
     
    3950    }
    4051
    41     void RadarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container){
     52    void RadarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, OverlayContainer* container){
    4253        // some initial data
    43                 om = &Ogre::OverlayManager::getSingleton();
     54                om = &OverlayManager::getSingleton();
    4455        dimRel_ = dimRel;
    4556        leftRel_ = leftRel;
     
    5263        // create nav marker ...
    5364        navMarker_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel", "NavMarker"));
    54         navMarker_->setMetricsMode(Ogre::GMM_PIXELS);
     65        navMarker_->setMetricsMode(GMM_PIXELS);
    5566        navMarker_->setMaterialName("Orxonox/NavMarker");
    5667        navMarker_->setDimensions(16,16);
     
    6778        plane = Plane(currentDir_, shipPos_);
    6879
    69         setMetricsMode(Ogre::GMM_PIXELS);
     80        setMetricsMode(GMM_PIXELS);
    7081        setMaterialName("Orxonox/Radar");
    7182        resize();
     
    189200        float RadarOverlayElement::calcPhi(RadarObject* obj){
    190201            // project difference vector on our plane...
    191             Ogre::Vector3 proj = plane.projectVector(obj->pos_ - shipPos_);
     202            Vector3 proj = plane.projectVector(obj->pos_ - shipPos_);
    192203            // ...and find out the angle
    193204            return(acos((currentOrth_.dotProduct(proj))/
  • code/trunk/src/orxonox/hud/RadarOverlayElement.h

    r1387 r1392  
    2929#define _RADAR_H__
    3030
    31 #include <string.h>
    32 #include <OgreOverlayManager.h>
    33 #include <OgreStringConverter.h>
    34 #include <OgreOverlayElement.h>
    35 #include <OgrePanelOverlayElement.h>
     31#include <util/Math.h>
    3632#include <OgrePrerequisites.h>
    37 
    38 #include <util/Math.h>
    39 #include <string.h>
    40 #include "core/Tickable.h"
    41 #include "core/ConsoleCommand.h"
    42 #include "objects/SpaceShip.h"
    4333#include "../OrxonoxPrereqs.h"
    4434#include "RadarObject.h"
    45 #include "GraphicsEngine.h"
    4635
    4736namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.