Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 2, 2006, 5:00:49 AM (19 years ago)
Author:
bensch
Message:

more radar work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/elements/glgui_radar.h

    r8991 r8992  
    1717  class GLGuiRadar : public GLGuiWidget
    1818  {
     19  public:
     20    typedef enum {
     21      Linear,
     22      Exponential,
     23    } Attenuation;
    1924
    2025  public:
     
    2328
    2429    void setRange(float range);
     30
     31    void setUpdateInterval(float updateInterval) { this->_updateInterval = updateInterval; };
     32    void setAttenuation(Attenuation attenuation);
     33
    2534    float range() const { return this->_range; }
     35
     36
     37    void tick(float dt);
     38    void draw() const;
    2639
    2740  protected:
     
    3346    typedef struct
    3447    {
    35 
    36       Color                     dotColor;
    37       std::list<WorldEntity*>&  entityList;
    38       std::vector<Vector2D>     position;
    39     } DotList;
     48      Color                           dotColor;
     49      const std::list<WorldEntity*>&  entityList;
     50      std::vector<Vector2D>           position;
     51    }
     52    DotList;
    4053
    4154    std::vector<DotList>        _dotLists;
    4255
     56    Attenuation                 _attenuation;
    4357    float                       _range;
    4458
     59
     60    float                       _updateInterval;
     61    float                       _timePassed;
    4562  };
    4663}
Note: See TracChangeset for help on using the changeset viewer.