Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 8, 2008, 5:46:52 AM (16 years ago)
Author:
landauf
Message:
  • several small changes in most of the HUD classes (code cleanup): removed obsolete variables, privatized all member variables, removed resizing functioncalls from tick, destroying overlayelements, added some const qualifiers.
  • moved calculation functions for RadarObject-position to Math.h and changed the phi/right/radius format to Vector2. the functions are used too by SpaceShipAI.
  • cycleNavigationFocus takes the nearest object if focus was NULL
  • BarOverlayElement works in both directions (left to right and right to left)
  • fixed bug causing SpaceShipAI to not stop shooting when losing target - this also speeds up orxonox a lot, because there are less projectiles

####################################

!! UPDATE YOUR MEDIA REPOSITORY !!

####################################
…or the BarOverlayElement will look strange

File:
1 edited

Legend:

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

    r1505 r1564  
    4040    class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
    4141    {
    42       private:
    43         Ogre::OverlayManager* om;               // our one and only overlay manager
    44         Ogre::OverlayContainer* container_;     // pointer to the container we're in
    45         Vector3 currentDir_;
    46         Vector3 currentOrth_;
    47         Vector3 shipPos_;                       // position of ship
    48 
    49         Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
    50         int left_, top_, dim_;                  // absolute position/dimension
    51         int windowW_, windowH_;                   // absolute window dimensions
    52 
    5342      public:
    5443        RadarOverlayElement(const Ogre::String& name);
     
    5746        void resize();
    5847        void update();
    59         void listObjects();
     48        void listObjects() const;
    6049
    61         static float calcRadius(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj);
    62         static float calcPhi(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj);
    63         static bool calcRight(Vector3 pos, Vector3 dir, Vector3 orth, RadarObject* obj);
     50      private:
     51        Ogre::Real leftRel_, topRel_, dimRel_;  // relative position/dimension
     52        int left_, top_, dim_;                  // absolute position/dimension
    6453  };
    6554}
Note: See TracChangeset for help on using the changeset viewer.