Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2010, 8:30:38 PM (14 years ago)
Author:
scheusso
Message:

merging hudelements into presentation3 and reducing (or increasing) output level of lod debug output

Location:
code/branches/presentation3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3

  • code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.h

    r6417 r6942  
    3232#include "overlays/OverlaysPrereqs.h"
    3333
     34#include <map>
     35#include <string>
     36
    3437#include "util/OgreForwardRefs.h"
    3538#include "tools/interfaces/Tickable.h"
     39#include "interfaces/RadarListener.h"
    3640#include "overlays/OrxonoxOverlay.h"
    3741
    3842namespace orxonox
    3943{
    40     class _OverlaysExport HUDNavigation : public OrxonoxOverlay, public Tickable
     44    class _OverlaysExport HUDNavigation : public OrxonoxOverlay, public Tickable, public RadarListener
    4145    {
    4246    public:
     
    4751        virtual void tick(float dt);
    4852
     53        virtual void addObject(RadarViewable* object);
     54        virtual void removeObject(RadarViewable* viewable);
     55        virtual void objectChanged(RadarViewable* viewable) {}
     56
     57        virtual void changedOwner();
     58        virtual void sizeChanged();
     59        virtual void angleChanged() { }
     60        virtual void positionChanged() { }
     61        virtual void radarTick(float dt) {}
     62
     63        inline float getRadarSensitivity() const
     64            { return 1.0f; }
     65
    4966    private:
    50         void sizeChanged();
    51         void angleChanged() { }
    52         void positionChanged() { }
     67        struct ObjectInfo
     68        {
     69            Ogre::PanelOverlayElement* panel_;
     70            Ogre::TextAreaOverlayElement* text_;
     71            bool outOfView_;
     72            bool wasOutOfView_;
     73        };
    5374
    5475        // XMLPort accessors
    55         void setNavMarkerSize(float size) { this->navMarkerSize_ = size; this->sizeChanged(); }
    56         float getNavMarkerSize() const    { return this->navMarkerSize_; }
    57 
    58 /*
    59         void setAimMarkerSize(float size) { this->aimMarkerSize_ = size; this->sizeChanged(); }
    60         float getAimMarkerSize() const    { return this->aimMarkerSize_; }
    61 */
     76        void setNavMarkerSize(float size)
     77            { navMarkerSize_ = size; this->sizeChanged(); }
     78        float getNavMarkerSize() const
     79            { return navMarkerSize_; }
    6280
    6381        void setTextSize(float size);
     
    6785        const std::string& getFont() const;
    6886
    69         void updateMarker();
    70         void updateFocus();
    71         float getDist2Focus() const;
     87        typedef std::map<RadarViewable*, ObjectInfo > ObjectMap;
     88        ObjectMap activeObjectList_;
    7289
    73         Ogre::PanelOverlayElement* navMarker_;      //!< the panel used to show the arrow and the target marker
    74         float navMarkerSize_;                       //!< One paramter size of the navigation marker
    75 /*
    76         Ogre::PanelOverlayElement* aimMarker_;      //!< Panel used to show the aim Marker
    77         float aimMarkerSize_;                       //!< One paramter size of the aim marker
    78 */
    79         Ogre::TextAreaOverlayElement* navText_;     //!< Text overlay to display the target distance
    80         bool wasOutOfView_;                         //!< Performance booster variable: setMaterial is not cheap
     90        float navMarkerSize_;
     91        std::string fontName_;
     92        float textSize_;
    8193    };
    8294}
Note: See TracChangeset for help on using the changeset viewer.