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/orxonox/interfaces/RadarViewable.h

    r5781 r6942  
    3636
    3737#include "util/Math.h"
    38 #include "util/OgreForwardRefs.h"
    3938#include "core/OrxonoxClass.h"
     39#include "core/SmartPtr.h"
    4040
    4141namespace orxonox
    4242{
     43    class BaseObject;
     44
    4345    /**
    4446    @brief Interface for receiving window events.
     
    5658
    5759    public:
    58         RadarViewable();
     60        RadarViewable(BaseObject* creator);
    5961        virtual ~RadarViewable();
    6062
    6163        inline void setRadarObjectCamouflage(float camouflage)
    62             { this->radarObjectCamouflage_ = camouflage; }
     64            {
     65                if( this->radarObjectCamouflage_ != camouflage )
     66                {
     67                    this->radarObjectCamouflage_ = camouflage;
     68                    this->settingsChanged();
     69                }
     70            }
    6371        inline float getRadarObjectCamouflage() const
    6472            { return this->radarObjectCamouflage_; }
    6573
    6674        inline void setRadarObjectColour(const ColourValue& colour)
    67             { this->radarObjectColour_ = colour; }
     75            {
     76                if(this->radarObjectColour_ != colour)
     77                {
     78                    this->radarObjectColour_ = colour;
     79                    this->settingsChanged();
     80                }
     81            }
    6882        inline const ColourValue& getRadarObjectColour() const
    6983            { return this->radarObjectColour_; }
    7084
    71         void setRadarObjectDescription(const std::string& str);
    72         inline const std::string& getRadarObjectDescription() const
    73             { return this->radarObjectDescription_; }
     85//         void setRadarObjectDescription(const std::string& str);
     86//         inline const std::string& getRadarObjectDescription() const
     87//             { return this->radarObjectDescription_; }
    7488
    7589        inline void setRadarVisibility(bool b)
    76             { this->bVisibility_ = b; }
     90            {
     91                if(b!=this->bVisibility_)
     92                {
     93                    this->bVisibility_ = b;
     94                    this->settingsChanged();
     95                }
     96            }
    7797        inline bool getRadarVisibility() const
    7898            { return this->bVisibility_; }
     
    84104
    85105        inline void setRadarObjectShape(Shape shape)
    86             { this->radarObjectShape_ = shape; }
     106            {
     107                if( this->radarObjectShape_ != shape )
     108                {
     109                    this->radarObjectShape_ = shape;
     110                    this->settingsChanged();
     111                }
     112            }
    87113        inline Shape getRadarObjectShape() const
    88114            { return this->radarObjectShape_; }
     115        void settingsChanged();
    89116
    90 /*
    91         inline void setMapNode(Ogre::SceneNode * node)
    92             { this->MapNode_ = node; }
    93         inline Ogre::SceneNode * getMapNode() const
    94             { return this->MapNode_; }
    95         inline void setMapEntity(Ogre::Entity * ent)
    96             { this->MapEntity_ = ent; }
    97         inline Ogre::Entity * getMapEntity() const
    98             { return this->MapEntity_; }
    99 */
    100         //Used for Map
    101         Ogre::SceneNode * MapNode_;
    102         Ogre::Entity * MapEntity_;
    103         Ogre::DynamicLines* line_;
    104         Ogre::SceneNode * LineNode_;
    105         void addMapEntity();
    106         void updateMapPosition();
     117
    107118        bool isHumanShip_;
    108119        inline const std::string& getUniqueId()
     
    115126        void validate(const WorldEntity* object) const;
    116127        bool bVisibility_;
     128        bool bInitialized_;
    117129        //Map
    118130        std::string uniqueId_;
     131        BaseObject* creator_;
    119132
    120133
    121134        //Radar
     135        SmartPtr<Radar> radar_;
    122136        float radarObjectCamouflage_;
    123137        Shape radarObjectShape_;
Note: See TracChangeset for help on using the changeset viewer.