Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 1, 2008, 3:54:20 PM (16 years ago)
Author:
rgrieder
Message:
  • @everyone: Do not create a branch until I've added the svn:eol-style property correctly. Otherwise this would cost me another 4 hours or so when we want to merge back.
  • merged network branch back to trunk
  • I had to omit the changes from last evening concerning the line endings
  • might not work yet because of the line endings
  • @beni: script branch is the only branch still open. you probably will have to apply a patch because of inconsistent new lines
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/util/MultiTypeMath.h

    r1064 r1502  
    6363        inline MultiTypeMath(const orxonox::Vector2&     value) { this->setValue(value); }
    6464        inline MultiTypeMath(const orxonox::Vector3&     value) { this->setValue(value); }
     65        inline MultiTypeMath(const orxonox::Vector4&     value) { this->setValue(value); }
    6566        inline MultiTypeMath(const orxonox::ColourValue& value) { this->setValue(value); }
    6667        inline MultiTypeMath(const orxonox::Quaternion&  value) { this->setValue(value); }
     
    6869        inline MultiTypeMath(const orxonox::Degree&      value) { this->setValue(value); }
    6970        inline MultiTypeMath(const MultiTypeMath& mtm)          { this->setValue(mtm);   }
     71        inline MultiTypeMath(const MultiTypeString& mts)        { this->setValue(mts);   }
     72        inline MultiTypeMath(const MultiTypePrimitive& mtp)     { this->setValue(mtp);   }
    7073        virtual inline ~MultiTypeMath() {}
    7174
     
    7376        inline MultiTypeMath& operator=(const orxonox::Vector2&     value) { this->setValue(value); return *this; }
    7477        inline MultiTypeMath& operator=(const orxonox::Vector3&     value) { this->setValue(value); return *this; }
     78        inline MultiTypeMath& operator=(const orxonox::Vector4&     value) { this->setValue(value); return *this; }
    7579        inline MultiTypeMath& operator=(const orxonox::ColourValue& value) { this->setValue(value); return *this; }
    7680        inline MultiTypeMath& operator=(const orxonox::Quaternion&  value) { this->setValue(value); return *this; }
     
    7882        inline MultiTypeMath& operator=(const orxonox::Degree&      value) { this->setValue(value); return *this; }
    7983        inline MultiTypeMath& operator=(const MultiTypeMath& mtm)          { this->setValue(mtm);   return *this; }
     84        inline MultiTypeMath& operator=(const MultiTypeString& mts)        { this->setValue(mts);   return *this; }
     85        inline MultiTypeMath& operator=(const MultiTypePrimitive mtp)      { this->setValue(mtp);   return *this; }
    8086
    8187        using MultiTypeString::operator==;
    8288        inline bool operator==(const orxonox::Vector2&     value) const { return (this->vector2_     == value); }
    8389        inline bool operator==(const orxonox::Vector3&     value) const { return (this->vector3_     == value); }
     90        inline bool operator==(const orxonox::Vector4&     value) const { return (this->vector4_     == value); }
    8491        inline bool operator==(const orxonox::ColourValue& value) const { return (this->colourvalue_ == value); }
    8592        inline bool operator==(const orxonox::Quaternion&  value) const { return (this->quaternion_  == value); }
     
    8794        inline bool operator==(const orxonox::Degree&      value) const { return (this->degree_      == value); }
    8895        bool operator==(const MultiTypeMath& mtm) const;
     96        bool operator==(const MultiTypeString& mts) const;
     97        bool operator==(const MultiTypePrimitive& mtp) const;
    8998
    9099        using MultiTypeString::operator!=;
    91100        inline bool operator!=(const orxonox::Vector2&     value) const { return (this->vector2_     != value); }
    92101        inline bool operator!=(const orxonox::Vector3&     value) const { return (this->vector3_     != value); }
     102        inline bool operator!=(const orxonox::Vector4&     value) const { return (this->vector4_     != value); }
    93103        inline bool operator!=(const orxonox::ColourValue& value) const { return (this->colourvalue_ != value); }
    94104        inline bool operator!=(const orxonox::Quaternion&  value) const { return (this->quaternion_  != value); }
     
    96106        inline bool operator!=(const orxonox::Degree&      value) const { return (this->degree_      != value); }
    97107        bool operator!=(const MultiTypeMath& mtm) const;
     108        bool operator!=(const MultiTypeString& mts) const;
     109        bool operator!=(const MultiTypePrimitive& mtp) const;
    98110
    99111        virtual operator void*()                const;
     
    114126        virtual operator orxonox::Vector2()     const;
    115127        virtual operator orxonox::Vector3()     const;
     128        virtual operator orxonox::Vector4()     const;
    116129        virtual operator orxonox::ColourValue() const;
    117130        virtual operator orxonox::Quaternion()  const;
     
    122135        inline void setValue(const orxonox::Vector2&     value) { this->type_ = MT_vector2;     this->vector2_     = value; }
    123136        inline void setValue(const orxonox::Vector3&     value) { this->type_ = MT_vector3;     this->vector3_     = value; }
     137        inline void setValue(const orxonox::Vector4&     value) { this->type_ = MT_vector4;     this->vector4_     = value; }
    124138        inline void setValue(const orxonox::ColourValue& value) { this->type_ = MT_colourvalue; this->colourvalue_ = value; }
    125139        inline void setValue(const orxonox::Quaternion&  value) { this->type_ = MT_quaternion;  this->quaternion_  = value; }
     
    127141        inline void setValue(const orxonox::Degree&      value) { this->type_ = MT_degree;      this->degree_      = value; }
    128142        void setValue(const MultiTypeMath& mtm);
     143        void setValue(const MultiTypeString& mts);
     144        void setValue(const MultiTypePrimitive& mtp);
    129145
    130146        inline orxonox::Vector2     getVector2()     const { return this->vector2_;     }
    131147        inline orxonox::Vector3     getVector3()     const { return this->vector3_;     }
     148        inline orxonox::Vector4     getVector4()     const { return this->vector4_;     }
    132149        inline orxonox::ColourValue getColourValue() const { return this->colourvalue_; }
    133150        inline orxonox::Quaternion  getQuaternion()  const { return this->quaternion_;  }
     
    137154        inline orxonox::Vector2&     getVector2()     { return this->vector2_;     }
    138155        inline orxonox::Vector3&     getVector3()     { return this->vector3_;     }
     156        inline orxonox::Vector4&     getVector4()     { return this->vector4_;     }
    139157        inline orxonox::ColourValue& getColourValue() { return this->colourvalue_; }
    140158        inline orxonox::Quaternion&  getQuaternion()  { return this->quaternion_;  }
     
    145163        inline void getValue(orxonox::Vector2*     variable) const { (*variable) = orxonox::Vector2     (this->vector2_);     }
    146164        inline void getValue(orxonox::Vector3*     variable) const { (*variable) = orxonox::Vector3     (this->vector3_);     }
     165        inline void getValue(orxonox::Vector4*     variable) const { (*variable) = orxonox::Vector4     (this->vector4_);     }
    147166        inline void getValue(orxonox::ColourValue* variable) const { (*variable) = orxonox::ColourValue (this->colourvalue_); }
    148167        inline void getValue(orxonox::Quaternion*  variable) const { (*variable) = orxonox::Quaternion  (this->quaternion_);  }
     
    155174        virtual bool fromString(const std::string value);
    156175
     176        virtual bool assimilate(const MultiTypeMath& mtm, const MultiTypeMath& defvalue = MultiTypeMath());
     177
    157178    protected:
    158179        orxonox::Vector2      vector2_;
    159180        orxonox::Vector3      vector3_;
     181        orxonox::Vector4      vector4_;
    160182        orxonox::ColourValue  colourvalue_;
    161183        orxonox::Quaternion   quaternion_;
Note: See TracChangeset for help on using the changeset viewer.