Changeset 1319 for code/branches/console/src/util/MultiTypeMath.h
- Timestamp:
- May 19, 2008, 12:55:41 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/util/MultiTypeMath.h
r1064 r1319 63 63 inline MultiTypeMath(const orxonox::Vector2& value) { this->setValue(value); } 64 64 inline MultiTypeMath(const orxonox::Vector3& value) { this->setValue(value); } 65 inline MultiTypeMath(const orxonox::Vector4& value) { this->setValue(value); } 65 66 inline MultiTypeMath(const orxonox::ColourValue& value) { this->setValue(value); } 66 67 inline MultiTypeMath(const orxonox::Quaternion& value) { this->setValue(value); } … … 73 74 inline MultiTypeMath& operator=(const orxonox::Vector2& value) { this->setValue(value); return *this; } 74 75 inline MultiTypeMath& operator=(const orxonox::Vector3& value) { this->setValue(value); return *this; } 76 inline MultiTypeMath& operator=(const orxonox::Vector4& value) { this->setValue(value); return *this; } 75 77 inline MultiTypeMath& operator=(const orxonox::ColourValue& value) { this->setValue(value); return *this; } 76 78 inline MultiTypeMath& operator=(const orxonox::Quaternion& value) { this->setValue(value); return *this; } … … 82 84 inline bool operator==(const orxonox::Vector2& value) const { return (this->vector2_ == value); } 83 85 inline bool operator==(const orxonox::Vector3& value) const { return (this->vector3_ == value); } 86 inline bool operator==(const orxonox::Vector4& value) const { return (this->vector4_ == value); } 84 87 inline bool operator==(const orxonox::ColourValue& value) const { return (this->colourvalue_ == value); } 85 88 inline bool operator==(const orxonox::Quaternion& value) const { return (this->quaternion_ == value); } … … 91 94 inline bool operator!=(const orxonox::Vector2& value) const { return (this->vector2_ != value); } 92 95 inline bool operator!=(const orxonox::Vector3& value) const { return (this->vector3_ != value); } 96 inline bool operator!=(const orxonox::Vector4& value) const { return (this->vector4_ != value); } 93 97 inline bool operator!=(const orxonox::ColourValue& value) const { return (this->colourvalue_ != value); } 94 98 inline bool operator!=(const orxonox::Quaternion& value) const { return (this->quaternion_ != value); } … … 114 118 virtual operator orxonox::Vector2() const; 115 119 virtual operator orxonox::Vector3() const; 120 virtual operator orxonox::Vector4() const; 116 121 virtual operator orxonox::ColourValue() const; 117 122 virtual operator orxonox::Quaternion() const; … … 122 127 inline void setValue(const orxonox::Vector2& value) { this->type_ = MT_vector2; this->vector2_ = value; } 123 128 inline void setValue(const orxonox::Vector3& value) { this->type_ = MT_vector3; this->vector3_ = value; } 129 inline void setValue(const orxonox::Vector4& value) { this->type_ = MT_vector4; this->vector4_ = value; } 124 130 inline void setValue(const orxonox::ColourValue& value) { this->type_ = MT_colourvalue; this->colourvalue_ = value; } 125 131 inline void setValue(const orxonox::Quaternion& value) { this->type_ = MT_quaternion; this->quaternion_ = value; } … … 130 136 inline orxonox::Vector2 getVector2() const { return this->vector2_; } 131 137 inline orxonox::Vector3 getVector3() const { return this->vector3_; } 138 inline orxonox::Vector4 getVector4() const { return this->vector4_; } 132 139 inline orxonox::ColourValue getColourValue() const { return this->colourvalue_; } 133 140 inline orxonox::Quaternion getQuaternion() const { return this->quaternion_; } … … 137 144 inline orxonox::Vector2& getVector2() { return this->vector2_; } 138 145 inline orxonox::Vector3& getVector3() { return this->vector3_; } 146 inline orxonox::Vector4& getVector4() { return this->vector4_; } 139 147 inline orxonox::ColourValue& getColourValue() { return this->colourvalue_; } 140 148 inline orxonox::Quaternion& getQuaternion() { return this->quaternion_; } … … 145 153 inline void getValue(orxonox::Vector2* variable) const { (*variable) = orxonox::Vector2 (this->vector2_); } 146 154 inline void getValue(orxonox::Vector3* variable) const { (*variable) = orxonox::Vector3 (this->vector3_); } 155 inline void getValue(orxonox::Vector4* variable) const { (*variable) = orxonox::Vector4 (this->vector4_); } 147 156 inline void getValue(orxonox::ColourValue* variable) const { (*variable) = orxonox::ColourValue (this->colourvalue_); } 148 157 inline void getValue(orxonox::Quaternion* variable) const { (*variable) = orxonox::Quaternion (this->quaternion_); } … … 155 164 virtual bool fromString(const std::string value); 156 165 166 virtual void assimilate(const MultiTypeMath& mtm); 167 157 168 protected: 158 169 orxonox::Vector2 vector2_; 159 170 orxonox::Vector3 vector3_; 171 orxonox::Vector4 vector4_; 160 172 orxonox::ColourValue colourvalue_; 161 173 orxonox::Quaternion quaternion_;
Note: See TracChangeset
for help on using the changeset viewer.