Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 21, 2008, 2:35:24 PM (16 years ago)
Author:
rgrieder
Message:
  • Dots on the Radar actually disappear now when a Ship gets destroyed…
  • svn save to keep History of HUDText when renaming AND moving
File:
1 copied

Legend:

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

    r1613 r1614  
    2727 */
    2828
    29 #ifndef _RadarViewable_H__
    30 #define _RadarViewable_H__
     29#ifndef _RadarListener_H__
     30#define _RadarListener_H__
    3131
    3232#include "OrxonoxPrereqs.h"
    33 #include <string>
    3433#include "core/OrxonoxClass.h"
    35 #include "util/Math.h"
    3634
    3735namespace orxonox
    3836{
    39     /**
    40     @brief Interface for receiving window events.
    41     */
    42     class _OrxonoxExport RadarViewable : virtual public OrxonoxClass
     37    class _OrxonoxExport RadarListener : virtual public OrxonoxClass
    4338    {
    4439    public:
    45         enum Shape
    46         {
    47             Square,
    48             Dot,
    49             Triangle
    50         };
     40        RadarListener();
     41        virtual ~RadarListener() { }
    5142
    52     public:
    53         RadarViewable();
    54         virtual ~RadarViewable() { }//unregisterFromRadar(); }
    55 
    56         float getRadarObjectCamouflage() const { return this->radarObjectCamouflage_; }
    57         void setRadarObjectCamouflage(float camouflage) { this->radarObjectCamouflage_ = camouflage; }
    58 
    59         const ColourValue& getRadarObjectColour() const { return this->radarObjectColour_; }
    60         void setRadarObjectColour(const ColourValue& colour) { this->radarObjectColour_ = colour; }
    61 
    62         const std::string& getRadarObjectDescription() const { return this->radarObjectDescription_; }
    63         void setRadarObjectDescription(const std::string& str);
    64 
    65         const WorldEntity* getWorldEntity() const { return this->radarObject_; }
    66         const Vector3& getWorldPosition() const { validate(); return this->radarObject_->getWorldPosition(); }
    67         Vector3 getOrientedVelocity() const
    68             { validate(); return this->radarObject_->getOrientation() * this->radarObject_->getVelocity(); }
    69 
    70         Shape getRadarObjectType() const { return this->radarObjectType_; }
    71 
    72     protected:
    73         WorldEntity* radarObject_;
    74         //void unregisterFromRadar();
    75 
    76     private:
    77         void validate() const { if (!this->radarObject_)
    78         { COUT(1) << "Assertation: Every RadarViewable has to be assigned a WorldEntity pointer!" << std::endl; assert(0); } }
    79 
    80         float radarObjectCamouflage_;
    81         Shape radarObjectType_;
    82         std::string radarObjectDescription_;
    83         ColourValue radarObjectColour_;
     43        virtual void displayObject(RadarViewable* viewable, bool bIsMarked) = 0;
     44        virtual float getRadarSensitivity() = 0;
     45        virtual void radarTick(float dt) = 0;
    8446    };
    8547}
    8648
    87 #endif /* _RadarViewable_H__ */
     49#endif /* _RadarListener_H__ */
Note: See TracChangeset for help on using the changeset viewer.