Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1410


Ignore:
Timestamp:
May 24, 2008, 3:38:39 PM (16 years ago)
Author:
rgrieder
Message:
  • converted tabs to spaces in HUD
  • adjusted msvc project
Location:
code/branches/network
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/OrxonoxPrereqs.h

    r1214 r1410  
    9595
    9696  // hud
     97  class BarOverlayElement;
    9798  class HUD;
     99  class Navigation;
     100  class RadarObject;
     101  class RadarOverlayElement;
     102
    98103  //console
    99104  class InGameConsole;
  • code/branches/network/src/orxonox/hud/BarOverlayElement.cc

    r1406 r1410  
    2727
    2828#include "OrxonoxStableHeaders.h"
     29#include "BarOverlayElement.h"
     30
    2931#include <OgreOverlayManager.h>
    3032#include "GraphicsEngine.h"
    31 #include "BarOverlayElement.h"
    3233
    3334namespace orxonox
    3435{
    35   using namespace Ogre;
     36    using namespace Ogre;
    3637
    3738    BarOverlayElement::BarOverlayElement(const String& name):PanelOverlayElement(name){
     
    125126    }
    126127}
    127 
    128 
    129 
  • code/branches/network/src/orxonox/hud/BarOverlayElement.h

    r1406 r1410  
    2727
    2828
    29 #ifndef _BAR_H__
    30 #define _BAR_H__
     29#ifndef _BarOverlayElement_H__
     30#define _BarOverlayElement_H__
    3131
     32#include "OrxonoxPrereqs.h"
    3233
     34#include <OgrePrerequisites.h>
    3335#include <OgrePanelOverlayElement.h>
    34 #include <OgrePrerequisites.h>
    35 #include "../OrxonoxPrereqs.h"
    3636
    3737namespace orxonox
     
    4040  {
    4141    private:
    42         bool autoColor_;                    // whether bar changes color automatically
    43         float value_;                       // progress of bar
    44         int color_;
    45         int left_;
    46         int top_;
    47         int width_;
    48         int height_;
    49         int windowW_, windowH_;
    50         Ogre::Real leftRel_;
    51         Ogre::Real topRel_;
    52         Ogre::Real dimRel_;
    53         Ogre::OverlayManager* om;           // our overlay manager
    54         Ogre::OverlayContainer* container_; // our parent container to attach to
    55         Ogre::OverlayContainer* background_;
    56         Ogre::String name_;
     42      bool autoColor_;                    // whether bar changes color automatically
     43      float value_;                       // progress of bar
     44      int color_;
     45      int left_;
     46      int top_;
     47      int width_;
     48      int height_;
     49      int windowW_, windowH_;
     50      Ogre::Real leftRel_;
     51      Ogre::Real topRel_;
     52      Ogre::Real dimRel_;
     53      Ogre::OverlayManager* om;           // our overlay manager
     54      Ogre::OverlayContainer* container_; // our parent container to attach to
     55      Ogre::OverlayContainer* background_;
     56      Ogre::String name_;
    5757
    5858    public:
    59         bool left2Right;
    60         static const int RED = 0;           // predefined colors
    61         static const int YELLOW = 1;
    62         static const int GREEN = 2;
     59      bool left2Right;
     60      static const int RED = 0;           // predefined colors
     61      static const int YELLOW = 1;
     62      static const int GREEN = 2;
    6363
    64         BarOverlayElement(const Ogre::String& name);
    65         virtual ~BarOverlayElement();
    66         void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
    67         void resize();
    68         void setValue(float value);
    69         void setColor(int color);
    70         float getValue();
    71         int getBarColor();
     64      BarOverlayElement(const Ogre::String& name);
     65      virtual ~BarOverlayElement();
     66      void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
     67      void resize();
     68      void setValue(float value);
     69      void setColor(int color);
     70      float getValue();
     71      int getBarColor();
    7272    };
    7373}
    74 #endif
    7574
    76 
     75#endif /* _BarOverlayElement_H__ */
  • code/branches/network/src/orxonox/hud/HUD.cc

    r1406 r1410  
    2626*/
    2727
    28 #include <string.h>
    2928#include "OrxonoxStableHeaders.h"
     29#include "HUD.h"
     30
     31#include <string>
    3032#include <OgreOverlay.h>
    3133#include <OgreOverlayContainer.h>
     
    3739#include "objects/SpaceShip.h"
    3840#include "BarOverlayElement.h"
     41#include "RadarObject.h"
    3942#include "RadarOverlayElement.h"
     43#include "Navigation.h"
    4044#include "OverlayElementFactories.h"
    41 #include "HUD.h"
    4245
    4346namespace orxonox
     
    5255        lastRadarObject = NULL;
    5356
    54                 // create Factories
     57        // create Factories
    5558        BarOverlayElementFactory *barOverlayElementFactory = new BarOverlayElementFactory();
    5659        om->addOverlayElementFactory(barOverlayElementFactory);
     
    8487        nav = new Navigation(container);
    8588
    86                 // set up screen-wide container
     89        // set up screen-wide container
    8790        container->show();
    8891
     
    144147    }
    145148
    146     /*static*/HUD& HUD::getSingleton(){
     149    /*static*/ HUD& HUD::getSingleton(){
    147150        static HUD theInstance;
    148151        return theInstance;
    149152    }
    150153
    151     /*static*/void HUD::setFPS(float fps){
     154    /*static*/ void HUD::setFPS(float fps){
    152155        HUD::getSingleton().fpsText->setCaption("FPS: " + Ogre::StringConverter::toString(fps));
    153156    }
    154157
    155     /*static*/void HUD::setEnergy(float value){
     158    /*static*/ void HUD::setEnergy(float value){
    156159        HUD::getSingleton().energyBar->setValue(value);
    157160    }
    158161
    159     /*static*/void HUD::cycleNavigationFocus(){
     162    /*static*/ void HUD::cycleNavigationFocus(){
    160163        HUD::getSingleton().nav->cycleFocus();
    161164    }
  • code/branches/network/src/orxonox/hud/HUD.h

    r1406 r1410  
    3030#define _HUD_H__
    3131
     32#include "OrxonoxPrereqs.h"
     33
    3234#include <OgrePrerequisites.h>
    3335#include <OgreTextAreaOverlayElement.h>
    34 #include "OrxonoxPrereqs.h"
    3536#include "core/Tickable.h"
    36 #include "BarOverlayElement.h"
    37 #include "RadarOverlayElement.h"
    38 #include "Navigation.h"
    39 #include "RadarObject.h"
    40 
     37#include "util/Math.h"
    4138
    4239namespace orxonox
     
    4441    class _OrxonoxExport HUD : public Tickable
    4542    {
    46         private:
    47             HUD();
    48             HUD(HUD& instance);
    49             ~HUD();
    50             Ogre::OverlayManager* om;
    51             Ogre::Overlay* orxonoxHUD;
    52             Ogre::OverlayContainer* container;
    53             Ogre::TextAreaOverlayElement* fpsText;
    54             BarOverlayElement* energyBar;
    55             BarOverlayElement* speedoBar;
    56             RadarOverlayElement* radar;
    57             RadarObject* firstRadarObject;
    58             RadarObject* lastRadarObject;
    59             Navigation* nav;
     43      private:
     44        HUD();
     45        HUD(HUD& instance);
     46        ~HUD();
     47        Ogre::OverlayManager* om;
     48        Ogre::Overlay* orxonoxHUD;
     49        Ogre::OverlayContainer* container;
     50        Ogre::TextAreaOverlayElement* fpsText;
     51        BarOverlayElement* energyBar;
     52        BarOverlayElement* speedoBar;
     53        RadarOverlayElement* radar;
     54        RadarObject* firstRadarObject;
     55        RadarObject* lastRadarObject;
     56        Navigation* nav;
    6057
    61         public:
    62             virtual void tick(float);
    63             void addRadarObject(Vector3 pos);
    64             RadarObject* getFirstRadarObject();
     58      public:
     59        virtual void tick(float);
     60        void addRadarObject(Vector3 pos);
     61        RadarObject* getFirstRadarObject();
    6562
    66             static HUD* instance_s;
    67             static HUD& getSingleton();
    68             static void setFPS(float fps);
    69             static void setEnergy(float value);
    70             static void cycleNavigationFocus();
     63        static HUD* instance_s;
     64        static HUD& getSingleton();
     65        static void setFPS(float fps);
     66        static void setEnergy(float value);
     67        static void cycleNavigationFocus();
    7168    };
    7269}
    7370
    74 #endif
     71#endif /* _HUD_H__ */
  • code/branches/network/src/orxonox/hud/Navigation.cc

    r1406 r1410  
    2626*/
    2727
     28#include "OrxonoxStableHeaders.h"
     29#include "Navigation.h"
     30
    2831#include <OgreOverlayManager.h>
    29 #include <OgrePanelOverlayElement.h>
    30 #include <OgreTextAreaOverlayElement.h>
    3132#include <OgreStringConverter.h>
    32 #include <GraphicsEngine.h>
     33
     34#include "GraphicsEngine.h"
     35// TODO: remove the SpaceShip and CameraHandler dependencies
    3336#include "objects/SpaceShip.h"
    3437#include "objects/CameraHandler.h"
     38#include "RadarObject.h"
     39#include "RadarOverlayElement.h"
    3540#include "HUD.h"
    36 #include "Navigation.h"
    3741
    3842namespace orxonox
     
    5357
    5458    void Navigation::init(){
    55                 om = &OverlayManager::getSingleton();
    56                 navCam_ = NULL;
     59        om = &OverlayManager::getSingleton();
     60        navCam_ = NULL;
    5761        // create nav text
    5862        navText_ = static_cast<TextAreaOverlayElement*>(om->createOverlayElement("TextArea", "navText"));
     
    7377        navText_->hide();
    7478        container_->addChild(navMarker_);
    75         }
    76 
    77         void Navigation::update(){
     79    }
     80
     81    void Navigation::update(){
    7882        if(focus_ == NULL) return;
    7983        navCamPos_ = SpaceShip::getLocalShip()->getPosition();
    8084        currentDir_ = SpaceShip::getLocalShip()->getDir();
    81                 currentOrth_ = SpaceShip::getLocalShip()->getOrth();
     85        currentOrth_ = SpaceShip::getLocalShip()->getOrth();
    8286
    8387        windowW_ = GraphicsEngine::getSingleton().getWindowWidth();
     
    168172            navText_->setPosition(xPos+navMarker_->getWidth()/2, yPos+navMarker_->getHeight()/2);
    169173        }
    170         }
     174    }
    171175
    172176    void Navigation::cycleFocus(){
    173             if(focus_ == NULL){
     177        if(focus_ == NULL){
    174178            focus_ = HUD::getSingleton().getFirstRadarObject();
    175             }
     179        }
    176180        else{
    177181            focus_->panel_->setMaterialName("Orxonox/RedDot");
     
    188192            focus_->panel_->setMaterialName("Orxonox/WhiteDot");
    189193        }
    190         }
    191 
    192         float Navigation::getDist2Focus(){
    193             if(focus_ == NULL) return(0.0);
    194             return((focus_->pos_-SpaceShip::getLocalShip()->getPosition()).length());
    195         }
     194    }
     195
     196    float Navigation::getDist2Focus(){
     197        if(focus_ == NULL) return(0.0);
     198        return((focus_->pos_-SpaceShip::getLocalShip()->getPosition()).length());
     199    }
    196200}
  • code/branches/network/src/orxonox/hud/Navigation.h

    r1406 r1410  
    2626*/
    2727
    28 #ifndef _NAVIGATION_H__
    29 #define _NAVIGATION_H__
     28#ifndef _Navigation_H__
     29#define _Navigation_H__
     30
     31#include "OrxonoxPrereqs.h"
    3032
    3133#include <OgrePrerequisites.h>
    32 #include "../OrxonoxPrereqs.h"
    33 #include <OgrePlane.h>
     34#include <OgreTextAreaOverlayElement.h>
     35#include <OgrePanelOverlayElement.h>
    3436#include "util/Math.h"
    35 #include "RadarObject.h"
    3637
    3738namespace orxonox
    3839{
     40
    3941    class _OrxonoxExport Navigation
    4042    {
    41         private:
    42                 Ogre::OverlayManager* om;                                   // our one and only overlay manager
    43             Ogre::OverlayContainer* container_;
    44             Ogre::PanelOverlayElement* navMarker_;      // the panel used to show the arrow
    45             Ogre::TextAreaOverlayElement* navText_;     // displaying distance
    46             Ogre::Camera* navCam_;
    47                 Vector3 navCamPos_;                            // position of ship
    48                 Vector3 currentDir_;
    49             Vector3 currentOrth_;
    50                 int windowW_, windowH_;
    51                 void init();
    52                 void updateMarker();
     43      private:
     44        Ogre::OverlayManager* om;                                           // our one and only overlay manager
     45        Ogre::OverlayContainer* container_;
     46        Ogre::PanelOverlayElement* navMarker_;      // the panel used to show the arrow
     47        Ogre::TextAreaOverlayElement* navText_;     // displaying distance
     48        Ogre::Camera* navCam_;
     49        Vector3 navCamPos_;                         // position of ship
     50        Vector3 currentDir_;
     51        Vector3 currentOrth_;
     52        int windowW_, windowH_;
     53        void init();
     54        void updateMarker();
    5355
    54         public:
    55                 Navigation(Ogre::OverlayContainer* container);
    56                 Navigation(Ogre::OverlayContainer* container, RadarObject* focus);
    57                 ~Navigation();
    58                         RadarObject* focus_;                        // next pointer of linked list
     56      public:
     57        Navigation(Ogre::OverlayContainer* container);
     58        Navigation(Ogre::OverlayContainer* container, RadarObject* focus);
     59        ~Navigation();
     60        RadarObject* focus_;                        // next pointer of linked list
    5961
    60                 void update();
    61                 void cycleFocus();
    62                 float getDist2Focus();
    63         };
     62        void update();
     63        void cycleFocus();
     64        float getDist2Focus();
     65  };
    6466}
    6567
    66 #endif
     68#endif /* _Navigation_H__ */
  • code/branches/network/src/orxonox/hud/OverlayElementFactories.h

    r1362 r1410  
    2626*/
    2727
    28 #ifndef _FACTORIES_H__
    29 #define _FACTORIES_H__
     28#ifndef _OverlayElementFactories_H__
     29#define _OverlayElementFactories_H__
    3030
     31#include "OrxonoxPrereqs.h"
     32
     33#include <OgrePrerequisites.h>
    3134#include <OgreOverlayElement.h>
    32 #include <OgrePrerequisites.h>
    3335#include <OgreOverlayElementFactory.h>
    3436
    3537#include "BarOverlayElement.h"
     38#include "RadarOverlayElement.h"
    3639
    3740namespace orxonox{
    3841    class _OrxonoxExport BarOverlayElementFactory : public Ogre::OverlayElementFactory{
    39         public:
     42      public:
    4043        Ogre::OverlayElement* createOverlayElement(const Ogre::String& instanceName){
    4144            return new BarOverlayElement(instanceName);
     
    4851
    4952    class _OrxonoxExport RadarOverlayElementFactory : public Ogre::OverlayElementFactory{
    50         public:
     53      public:
    5154        Ogre::OverlayElement* createOverlayElement(const Ogre::String& instanceName){
    5255            return new RadarOverlayElement(instanceName);
     
    5962}
    6063
    61 #endif
     64#endif /* _OverlayElementFactories_H__ */
  • code/branches/network/src/orxonox/hud/RadarObject.cc

    r1408 r1410  
    2929#include "RadarObject.h"
    3030
    31 #include <string.h>
    3231#include <OgreOverlayManager.h>
    3332#include <OgreStringConverter.h>
     
    3736    using namespace Ogre;
    3837
    39         int RadarObject::count = 0;             // initialize static variable
     38    int RadarObject::count = 0;         // initialize static variable
    4039
    41         RadarObject::RadarObject(OverlayContainer* container){
    42                 container_ = container;
    43                 pos_ = Vector3(0.0, 0.0, 0.0);
    44                 init();
    45         }
     40    RadarObject::RadarObject(OverlayContainer* container){
     41        container_ = container;
     42        pos_ = Vector3(0.0, 0.0, 0.0);
     43        init();
     44    }
    4645
    47         RadarObject::RadarObject(OverlayContainer* container, Vector3 pos){
    48                 container_ = container;
    49                 pos_ = pos;
    50                 init();
    51         }
     46    RadarObject::RadarObject(OverlayContainer* container, Vector3 pos){
     47        container_ = container;
     48        pos_ = pos;
     49        init();
     50    }
    5251
    53         RadarObject::~RadarObject(){}
     52    RadarObject::~RadarObject(){}
    5453
    55         void RadarObject::init(){
    56             next = NULL;
    57                 om = &OverlayManager::getSingleton();
    58                 panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel",
    59                         "Object"+StringConverter::toString(count)));
    60                 panel_->setMaterialName("Orxonox/RedDot");
    61                 panel_->setDimensions(3,3);
     54    void RadarObject::init(){
     55        next = NULL;
     56        om = &OverlayManager::getSingleton();
     57        panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel",
     58          "Object"+StringConverter::toString(count)));
     59        panel_->setMaterialName("Orxonox/RedDot");
     60        panel_->setDimensions(3,3);
    6261        panel_->setMetricsMode(Ogre::GMM_PIXELS);
    6362        panel_->show();
     
    6564        count++;
    6665        container_->addChild(panel_);
    67         }
     66    }
    6867}
  • code/branches/network/src/orxonox/hud/RadarObject.h

    r1408 r1410  
    2626*/
    2727
    28 #ifndef _RADAR2_H__
    29 #define _RADAR2_H__
     28#ifndef _RadarObject_H__
     29#define _RadarObject_H__
     30
     31#include "OrxonoxPrereqs.h"
     32
    3033#include <OgrePrerequisites.h>
    3134#include <OgrePanelOverlayElement.h>
    32 #include "../OrxonoxPrereqs.h"
    3335#include "util/Math.h"
    3436
     
    3739    class _OrxonoxExport RadarObject
    3840    {
    39         private:
    40                 Ogre::OverlayManager* om;                               // our one and only overlay manager
    41                 void init();
     41      private:
     42        Ogre::OverlayManager* om;                               // our one and only overlay manager
     43        void init();
    4244
    43         public:
    44                 RadarObject(Ogre::OverlayContainer* container);
    45                 RadarObject(Ogre::OverlayContainer* container, Vector3 pos);
    46                 ~RadarObject();
     45      public:
     46        RadarObject(Ogre::OverlayContainer* container);
     47        RadarObject(Ogre::OverlayContainer* container, Vector3 pos);
     48        ~RadarObject();
    4749
    48             bool right_;
    49             int index_;                             // index number of object
    50                 Vector3 pos_;                                                   // position in space
    51                         Ogre::OverlayContainer* container_;
    52                         Ogre::PanelOverlayElement* panel_;              // the panel used to show the dot
    53                         RadarObject* next;                      // next pointer of linked list
     50        bool right_;
     51        int index_;                             // index number of object
     52        Vector3 pos_;                                                   // position in space
     53        Ogre::OverlayContainer* container_;
     54        Ogre::PanelOverlayElement* panel_;              // the panel used to show the dot
     55        RadarObject* next;                      // next pointer of linked list
    5456
    55                 static int count;
    56         };
     57        static int count;
     58  };
    5759}
    5860
    59 #endif
     61#endif /* _RadarObject_H__ */
  • code/branches/network/src/orxonox/hud/RadarOverlayElement.cc

    r1408 r1410  
    2929#include "RadarOverlayElement.h"
    3030
    31 #include <string.h>
     31#include <string>
    3232#include <OgreOverlayManager.h>
    3333#include <OgreStringConverter.h>
    34 #include <OgrePanelOverlayElement.h>
    3534
    3635#include "GraphicsEngine.h"
     
    3837#include "core/ConsoleCommand.h"
    3938#include "objects/SpaceShip.h"
     39#include "RadarObject.h"
    4040#include "HUD.h"
    4141
    4242namespace orxonox
    4343{
    44 
    4544    using namespace Ogre;
    4645
     
    5352    void RadarOverlayElement::init(Real leftRel, Real topRel, Real dimRel, OverlayContainer* container){
    5453        // some initial data
    55                 om = &OverlayManager::getSingleton();
     54        om = &OverlayManager::getSingleton();
    5655        dimRel_ = dimRel;
    5756        leftRel_ = leftRel;
     
    8079        shipPos_ = SpaceShip::getLocalShip()->getPosition();
    8180        currentDir_ = SpaceShip::getLocalShip()->getDir();
    82                 currentOrth_ = SpaceShip::getLocalShip()->getOrth();
     81        currentOrth_ = SpaceShip::getLocalShip()->getOrth();
    8382        RadarObject* ro = HUD::getSingleton().getFirstRadarObject();
    8483        // iterate through all RadarObjects
    85                 while(ro != NULL){
    86                     // calc position on radar...
     84        while(ro != NULL){
     85        // calc position on radar...
    8786            float radius = calcRadius(shipPos_, currentDir_, currentOrth_, ro);
    8887            float phi = calcPhi(shipPos_, currentDir_, currentOrth_, ro);
     
    105104            }
    106105            ro = ro->next;
    107                 }
     106        }
    108107    }
    109108
    110         void RadarOverlayElement::listObjects(){
    111             int i = 0;
    112             RadarObject* ro = HUD::getSingleton().getFirstRadarObject();
    113             COUT(3) << "List of RadarObjects:\n";
    114             // iterate through all Radar Objects
    115             while(ro != NULL) {
    116                 COUT(3) << i++ << ": " << ro->pos_ << std::endl;
    117                 ro = ro->next;
    118             }
    119         }
     109    void RadarOverlayElement::listObjects(){
     110        int i = 0;
     111        RadarObject* ro = HUD::getSingleton().getFirstRadarObject();
     112        COUT(3) << "List of RadarObjects:\n";
     113        // iterate through all Radar Objects
     114        while(ro != NULL) {
     115            COUT(3) << i++ << ": " << ro->pos_ << std::endl;
     116            ro = ro->next;
     117        }
     118    }
    120119
    121         float RadarOverlayElement::calcRadius(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj){
    122             return(acos((dir.dotProduct(obj->pos_ - pos))/
    123                         ((obj->pos_ - pos).length()*dir.length())));
    124         }
     120    float RadarOverlayElement::calcRadius(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj){
     121        return(acos((dir.dotProduct(obj->pos_ - pos))/
     122        ((obj->pos_ - pos).length()*dir.length())));
     123    }
    125124
    126         float RadarOverlayElement::calcPhi(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj){
    127             // project difference vector on our plane...
    128             Vector3 proj = Plane(dir, pos).projectVector(obj->pos_ - pos);
    129             // ...and find out the angle
    130             return(acos((orth.dotProduct(proj))/
    131             (orth.length()*proj.length())));
    132         }
     125    float RadarOverlayElement::calcPhi(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj){
     126        // project difference vector on our plane...
     127        Vector3 proj = Plane(dir, pos).projectVector(obj->pos_ - pos);
     128        // ...and find out the angle
     129        return(acos((orth.dotProduct(proj))/
     130              (orth.length()*proj.length())));
     131    }
    133132
    134         bool RadarOverlayElement::calcRight(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj){
    135             if((dir.crossProduct(orth)).dotProduct(obj->pos_ - pos) > 0)
    136                 return true;
     133    bool RadarOverlayElement::calcRight(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj){
     134        if((dir.crossProduct(orth)).dotProduct(obj->pos_ - pos) > 0)
     135            return true;
    137136        else return false;
    138         }
     137    }
    139138}
  • code/branches/network/src/orxonox/hud/RadarOverlayElement.h

    r1408 r1410  
    2626*/
    2727
    28 #ifndef _RADAR_H__
    29 #define _RADAR_H__
     28#ifndef _RadarOverlayElement_H__
     29#define _RadarOverlayElement_H__
    3030
    31 #include <util/Math.h>
     31#include "OrxonoxPrereqs.h"
     32
    3233#include <OgrePrerequisites.h>
    3334#include <OgrePanelOverlayElement.h>
    34 #include "../OrxonoxPrereqs.h"
    35 #include "RadarObject.h"
     35#include "util/Math.h"
    3636
    3737namespace orxonox
     
    3939    class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
    4040    {
    41         private:
    42             Ogre::OverlayManager* om;               // our one and only overlay manager
    43             Ogre::OverlayContainer* container_;     // pointer to the container we're in
    44             Vector3 currentDir_;
    45             Vector3 currentOrth_;
    46             Vector3 shipPos_;                       // position of ship
     41      private:
     42        Ogre::OverlayManager* om;               // our one and only overlay manager
     43        Ogre::OverlayContainer* container_;     // pointer to the container we're in
     44        Vector3 currentDir_;
     45        Vector3 currentOrth_;
     46        Vector3 shipPos_;                       // position of ship
    4747
    48             Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
    49             int left_, top_, dim_;                  // absolute position/dimension
    50             int windowW_, windowH_;                     // absolute window dimensions
     48        Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
     49        int left_, top_, dim_;                  // absolute position/dimension
     50        int windowW_, windowH_;                   // absolute window dimensions
    5151
    52         public:
    53             RadarOverlayElement(const Ogre::String& name);
    54             ~RadarOverlayElement();
    55             void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
    56                         void resize();
    57             void update();
    58             void listObjects();
     52      public:
     53        RadarOverlayElement(const Ogre::String& name);
     54        ~RadarOverlayElement();
     55        void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
     56        void resize();
     57        void update();
     58        void listObjects();
    5959
    60             static float calcRadius(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj);
    61             static float calcPhi(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj);
    62             static bool calcRight(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj);
    63         };
     60        static float calcRadius(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj);
     61        static float calcPhi(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj);
     62        static bool calcRight(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj);
     63  };
    6464}
    6565
    66 #endif
     66#endif /* _RadarOverlayElement_H__ */
  • code/branches/network/visual_studio/vc8/orxonox.vcproj

    r1373 r1410  
    196196                                </File>
    197197                                <File
     198                                        RelativePath="..\..\src\orxonox\hud\Navigation.cc"
     199                                        >
     200                                </File>
     201                                <File
    198202                                        RelativePath="..\..\src\orxonox\hud\RadarObject.cc"
    199203                                        >
     
    467471                                <File
    468472                                        RelativePath="..\..\src\orxonox\hud\HUD.h"
     473                                        >
     474                                </File>
     475                                <File
     476                                        RelativePath="..\..\src\orxonox\hud\Navigation.h"
    469477                                        >
    470478                                </File>
Note: See TracChangeset for help on using the changeset viewer.