Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 30, 2015, 11:59:18 AM (8 years ago)
Author:
landauf
Message:

using a strongly typed enum class for Light-Type.
added support for enum classes in Synchronisable. they are cast to the underlying type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/graphics/Light.h

    r10817 r10996  
    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
     
    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
     
    144144
    145145            Ogre::Light* light_;
    146             LightTypes type_;
     146            Light::Type type_;
    147147            ColourValue diffuse_;
    148148            ColourValue specular_;
Note: See TracChangeset for help on using the changeset viewer.