Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 20, 2008, 12:05:12 AM (16 years ago)
Author:
rgrieder
Message:
  • Radar now working like before
  • but more of a svn save..

There is class called Radar which takes care of the focus and all objects that can be displayed on a Radar.
The actual visual implementation is in HUDRadar.
To make a object radar viewable, simply implement RadarViewable and set the WorldEntitiy pointer in the constructor (assertation will fail otherwise!).
You can also set a camouflage value between 0 and 1 that tells how good a radar can see an object.
The HUDRadar (or another one) on the other side has a sensitivity between 0 and 1. So only if the sensitivity is higher than the camouflage value, the object gets displayed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud/src/orxonox/overlays/hud/HUDNavigation.h

    r1604 r1613  
    5050        void tick(float dt);
    5151
    52         void cycleFocus();
     52        //void cycleFocus();
    5353        float getDist2Focus() const;
    5454
    55         inline RadarObject* getFocus() const
     55        /*inline RadarObject* getFocus() const
    5656            { return this->focus_; }
    57         void releaseFocus();
     57        void releaseFocus();*/
    5858
    59         static void cycleNavigationFocus();
     59        /*static void cycleNavigationFocus();
    6060        static void releaseNavigationFocus();
    61         static HUDNavigation& getInstance();
     61        static HUDNavigation& getInstance();*/
    6262
    6363      protected:
     
    8787        float aimMarkerSize_;                       //!< One paramter size of the aim marker
    8888        Ogre::TextAreaOverlayElement* navText_;     //!< Text overlay to display the target distance
    89         std::list<RadarObject*>::iterator it_;
    90         RadarObject* focus_;                        // next pointer of linked list
    9189        bool wasOutOfView_;                         //!< Performance booster variable: setMaterial is not cheap
    9290
    93         static HUDNavigation* instance_s;
     91        //static HUDNavigation* instance_s;
    9492  };
    9593}
Note: See TracChangeset for help on using the changeset viewer.