Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2008, 10:51:53 PM (17 years ago)
Author:
FelixSchulthess
Message:

progress bars now resize automatically and have a new look

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h

    r1328 r1329  
    4141namespace orxonox
    4242{
     43    class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
     44    {
     45        private:
     46            Ogre::PanelOverlayElement* point;
     47            Ogre::OverlayContainer* container_;
     48            Ogre::OverlayManager* om;               // pointer to the one and only overlay manager
     49            Vector3 initialDir_;                        // direction of nose
     50            Vector3 currentDir_;
     51            Vector3 initialOrth_;                   // direction of normal
     52            Vector3 currentOrth_;
     53            Vector3 targetPos_;                     // position of target
     54            Vector3 shipPos_;                       // position of ship
    4355
    44   class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
    45   {
    46   private:
     56            Ogre::Real radius_;                     // radius on the radar
     57            Ogre::Real phi_;                        // angle on the radar
     58            bool right_;                            // checks whether the object is on the right side (since cos is not bijective)
     59            Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
     60            int left_, top_, dim_;                  // absolute position/dimension
     61            int windowW_, windowH_;                   // absolute window dimensions
     62            int count_;
    4763
    48     Ogre::PanelOverlayElement* point;
    49     Ogre::OverlayContainer* container_;
    50     Ogre::OverlayManager* om;               // pointer to the one and only overlay manager
    51     Vector3 initialDir_;                        // direction of nose
    52     Vector3 currentDir_;
    53     Vector3 initialOrth_;                   // direction of normal
    54     Vector3 currentOrth_;
    55     Vector3 targetPos_;                     // position of target
    56     Vector3 shipPos_;                       // position of ship
    57 
    58     Ogre::Real radius_;                     // radius on the radar
    59     Ogre::Real phi_;                        // angle on the radar
    60     bool right_;                            // checks whether the object is on the right side (since cos is not bijective)
    61     Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
    62     int left_, top_, dim_;                  // absolute position/dimension
    63     int windowW_, windowH_;                   // absolute window dimensions
    64     int count_;
    65 
    66     void resize();
    67 
    68   public:
    69 
    70     RadarOverlayElement(const Ogre::String& name);
    71     virtual ~RadarOverlayElement();
    72     virtual void initialise();
    73     void update();
    74     void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
    75     void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ);
    76     int newShip(int X, int Y, int Z);
    77 
    78     void resetShip(int shipID, int Y, int Z);
    79   };
     64        public:
     65            RadarOverlayElement(const Ogre::String& name);
     66            virtual ~RadarOverlayElement();
     67            virtual void initialise();
     68            void update();
     69            void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);
     70            void setMainShipPosition(int dirX, int dirY, int dirZ, int ortX, int ortY, int ortZ);
     71            int newShip(int X, int Y, int Z);
     72            void resize();
     73            void resetShip(int shipID, int Y, int Z);
     74    };
    8075}
    8176
Note: See TracChangeset for help on using the changeset viewer.