Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/graphics/AnimatedModel.h

    r9667 r11071  
    4444            virtual ~AnimatedModel();
    4545
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4747            void registerVariables();
    4848
     
    5151            virtual void setAnimEnabled(bool enabled);
    5252            virtual void setAnimLoop(bool loop);
    53             virtual void tick(float dt);
     53            virtual void tick(float dt) override;
    5454            virtual void changedMesh();
    5555
  • code/trunk/src/orxonox/graphics/Backlight.cc

    r9667 r11071  
    5151        RegisterObject(Backlight);
    5252
    53         this->ribbonTrail_ = 0;
    54         this->ribbonTrailNode_ = 0;
     53        this->ribbonTrail_ = nullptr;
     54        this->ribbonTrailNode_ = nullptr;
    5555
    5656        this->width_ = 0;
  • code/trunk/src/orxonox/graphics/Backlight.h

    r9667 r11071  
    4444            virtual ~Backlight();
    4545
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4747
    48             virtual void tick(float dt);
    49             virtual void changedVisibility();
     48            virtual void tick(float dt) override;
     49            virtual void changedVisibility() override;
    5050
    5151            inline void setWidth(float width)
     
    7474                { return this->trailmaterial_; }
    7575
    76             virtual void changedScale();
     76            virtual void changedScale() override;
    7777
    7878        protected:
    79             virtual void changedTimeFactor(float factor_new, float factor_old);
     79            virtual void changedTimeFactor(float factor_new, float factor_old) override;
    8080
    8181        private:
    8282            void registerVariables();
    83             virtual void startturnonoff();
    84             virtual void stopturnonoff();
    85             virtual void poststopturnonoff();
    86             virtual void changedColour();
     83            virtual void startturnonoff() override;
     84            virtual void stopturnonoff() override;
     85            virtual void poststopturnonoff() override;
     86            virtual void changedColour() override;
    8787            void update_width();
    8888            void update_lifetime();
  • code/trunk/src/orxonox/graphics/Billboard.cc

    r9667 r11071  
    139139    {
    140140        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    141         if( bSet != NULL )
     141        if( bSet != nullptr )
    142142        {
    143143            bSet->setBillboardType(bbt);
     
    148148    {
    149149        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    150         if( bSet != NULL )
     150        if( bSet != nullptr )
    151151        {
    152152            bSet->setCommonDirection( vec );
     
    157157    {
    158158        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    159         if( bSet != NULL )
     159        if( bSet != nullptr )
    160160        {
    161161            bSet->setCommonUpVector( vec );
     
    166166    {
    167167        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    168         if( bSet != NULL )
     168        if( bSet != nullptr )
    169169        {
    170170            bSet->setDefaultDimensions(width, height);
  • code/trunk/src/orxonox/graphics/Billboard.h

    r9667 r11071  
    4747            virtual ~Billboard();
    4848
    49             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5050
    51             virtual void changedVisibility();
     51            virtual void changedVisibility() override;
    5252
    5353            inline const BillboardSet& getBillboardSet() const
     
    7171
    7272
    73             virtual void setTeamColour(const ColourValue& colour)
     73            virtual void setTeamColour(const ColourValue& colour) override
    7474                { this->setColour(colour); }
    7575               
  • code/trunk/src/orxonox/graphics/BlinkingBillboard.h

    r9667 r11071  
    4444            virtual ~BlinkingBillboard();
    4545
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4747
    48             virtual void tick(float dt);
     48            virtual void tick(float dt) override;
    4949
    5050            inline void setAmplitude(float amplitude)
  • code/trunk/src/orxonox/graphics/Camera.h

    r9667 r11071  
    5050
    5151            void setConfigValues();
    52             virtual void tick(float dt);
     52            virtual void tick(float dt) override;
    5353
    5454            void requestFocus();
     
    7272            void configvaluecallback_changedNearClipDistance();
    7373
    74             void windowResized(unsigned int newWidth, unsigned int newHeight);
     74            virtual void windowResized(unsigned int newWidth, unsigned int newHeight) override;
    7575
    7676            Ogre::Camera*    camera_;
  • code/trunk/src/orxonox/graphics/FadingBillboard.h

    r9667 r11071  
    4545            virtual ~FadingBillboard();
    4646
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4848
    49             virtual void tick(float dt);
    50             virtual void changedActivity();
    51             virtual void changedVisibility();
     49            virtual void tick(float dt) override;
     50            virtual void changedActivity() override;
     51            virtual void changedVisibility() override;
    5252
    5353            inline void setTurnOnTime(float turnontime)
     
    6969            virtual void stopturnonoff();
    7070            virtual void poststopturnonoff();
    71             virtual void changedColour();
     71            virtual void changedColour() override;
    7272
    7373            float turnontime_;
  • code/trunk/src/orxonox/graphics/GlobalShader.h

    r9667 r11071  
    4444            virtual ~GlobalShader();
    4545
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4747
    48             virtual void changedVisibility();
     48            virtual void changedVisibility() override;
    4949
    5050            inline const Shader& getShader() const
  • code/trunk/src/orxonox/graphics/Light.cc

    r9667 r11071  
    3131#include <OgreSceneManager.h>
    3232#include <OgreLight.h>
    33 #include <boost/static_assert.hpp>
    3433
    3534#include "util/StringUtils.h"
     
    4544
    4645    // Be sure we don't do bad conversions
    47     BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT       == (int)Light::Point);
    48     BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Directional);
    49     BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Spotlight);
     46    static_assert((int)Ogre::Light::LT_POINT       == (int)Light::Type::Point,       "check enum");
     47    static_assert((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Type::Directional, "check enum");
     48    static_assert((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Type::Spotlight,   "check enum");
    5049
    5150    Light::Light(Context* context) : StaticEntity(context)
     
    5352        RegisterObject(Light);
    5453
    55         this->light_ = 0;
     54        this->light_ = nullptr;
    5655        this->diffuse_ = ColourValue::White;
    5756        this->specular_ = ColourValue::White;
    58         this->type_ = Light::Point;
     57        this->type_ = Type::Point;
    5958        this->attenuation_ = Vector4(100000, 1, 0, 0);
    6059        this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
     
    106105    void Light::registerVariables()
    107106    {
    108         registerVariable((int&)this->type_,     VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateType));
     107        registerVariable(this->type_,           VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateType));
    109108        registerVariable(this->diffuse_,        VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
    110109        registerVariable(this->specular_,       VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
     
    127126    void Light::updateAttenuation()
    128127    {
    129         if (this->light_ && this->type_ != Light::Directional)
     128        if (this->light_ && this->type_ != Type::Directional)
    130129            this->light_->setAttenuation(this->attenuation_.x, this->attenuation_.y, this->attenuation_.z, this->attenuation_.w);
    131130    }
     
    133132    void Light::updateSpotlightRange()
    134133    {
    135         if (this->light_ && this->type_ == Light::Spotlight)
     134        if (this->light_ && this->type_ == Type::Spotlight)
    136135            this->light_->setSpotlightRange(Degree(this->spotlightRange_.x), Degree(this->spotlightRange_.y), this->spotlightRange_.z);
    137136    }
     
    140139    {
    141140        if (type == "point")
    142             this->setType(Light::Point);
     141            this->setType(Type::Point);
    143142        else if (type == "directional")
    144             this->setType(Light::Directional);
     143            this->setType(Type::Directional);
    145144        else if (type == "spotlight")
    146             this->setType(Light::Spotlight);
     145            this->setType(Type::Spotlight);
    147146        else
    148             this->setType(Light::Point);
     147            this->setType(Type::Point);
    149148    }
    150149
     
    153152        switch (this->type_)
    154153        {
    155             case Light::Directional:
     154            case Type::Directional:
    156155                return "directional";
    157             case Light::Spotlight:
     156            case Type::Spotlight:
    158157                return "spotlight";
    159             case Light::Point:
     158            case Type::Point:
    160159            default:
    161160                return "point";
     
    169168            this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_));
    170169
    171             if (this->type_ != Light::Directional)
     170            if (this->type_ != Type::Directional)
    172171                this->updateAttenuation();
    173             if (this->type_ == Light::Spotlight)
     172            if (this->type_ == Type::Spotlight)
    174173                this->updateSpotlightRange();
    175174        }
  • code/trunk/src/orxonox/graphics/Light.h

    r9667 r11071  
    4242    {
    4343        public:
    44             enum LightTypes // Copy from the Ogre enum
     44            enum class Type // Copy from the Ogre enum
    4545            {
    4646                /// Point light sources give off light equally in all directions, so require only position not direction
     
    5656            virtual ~Light();
    5757
    58             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     58            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5959
    60             virtual void changedVisibility();
     60            virtual void changedVisibility() override;
    6161
    6262            inline Ogre::Light* getLight()
    6363                { return this->light_; }
    6464
    65             inline void setType(Light::LightTypes type)
     65            inline void setType(Light::Type type)
    6666                { this->type_ = type; this->updateType(); }
    67             inline Light::LightTypes getType() const
     67            inline Light::Type getType() const
    6868                { return this->type_; }
    6969
     
    7878                { return this->specular_; }
    7979
    80             virtual void setTeamColour(const ColourValue& colour)
     80            virtual void setTeamColour(const ColourValue& colour) override
    8181                { this->setDiffuseColour(colour); this->setSpecularColour(colour); }
    8282
     
    144144
    145145            Ogre::Light* light_;
    146             LightTypes type_;
     146            Light::Type type_;
    147147            ColourValue diffuse_;
    148148            ColourValue specular_;
  • code/trunk/src/orxonox/graphics/MeshLodInformation.h

    r9667 r11071  
    5050            float getReductionRate(){ return this->reductionRate_; }
    5151
    52             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     52            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5353
    5454        private:
  • code/trunk/src/orxonox/graphics/Model.cc

    r10728 r11071  
    134134            Level* level = this->getLevel();
    135135
    136             assert( level != 0 );
     136            assert( level != nullptr );
    137137
    138138            MeshLodInformation* lodInfo = level->getLodInfo(this->meshSrc_);
     
    157157                BaseObject* creatorPtr = this;
    158158
    159                 while(creatorPtr!=NULL&&orxonox_cast<WorldEntity*>(creatorPtr))
     159                while(creatorPtr!=nullptr&&orxonox_cast<WorldEntity*>(creatorPtr))
    160160                {
    161161                    scaleFactor *= getBiggestScale(((WorldEntity*) creatorPtr)->getScale3D());
  • code/trunk/src/orxonox/graphics/Model.h

    r9667 r11071  
    4646            void setConfigValues();
    4747
    48             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4949
    50             virtual void changedVisibility();
     50            virtual void changedVisibility() override;
    5151
    5252            inline const Mesh& getMesh() const
  • code/trunk/src/orxonox/graphics/ParticleEmitter.cc

    r9950 r11071  
    5252            ThrowException(AbortLoading, "Can't create ParticleEmitter, no scene or no scene manager given.");
    5353
    54         this->particles_ = 0;
     54        this->particles_ = nullptr;
    5555        this->LOD_ = LODParticle::Normal;
    5656
     
    102102        {
    103103            delete this->particles_;
    104             this->particles_ = 0;
     104            this->particles_ = nullptr;
    105105        }
    106106
  • code/trunk/src/orxonox/graphics/ParticleEmitter.h

    r9950 r11071  
    4343            virtual ~ParticleEmitter();
    4444
    45             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     45            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4646
    47             virtual void changedVisibility();
    48             virtual void changedActivity();
     47            virtual void changedVisibility() override;
     48            virtual void changedActivity() override;
    4949
    5050            inline ParticleInterface* getParticleInterface() const
  • code/trunk/src/orxonox/graphics/ParticleSpawner.h

    r9667 r11071  
    4343            virtual ~ParticleSpawner();
    4444
    45             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    46             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
     45            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     46            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    4747
    4848            inline void stop(bool bDestroy)
Note: See TracChangeset for help on using the changeset viewer.