diff --git a/dCommon/NiPoint3.cpp b/dCommon/NiPoint3.cpp index 20780815..5ad06f30 100644 --- a/dCommon/NiPoint3.cpp +++ b/dCommon/NiPoint3.cpp @@ -136,6 +136,13 @@ NiPoint3& NiPoint3::operator+=(const NiPoint3& point) { return *this; } +NiPoint3& NiPoint3::operator*=(const float scalar) { + this->x *= scalar; + this->y *= scalar; + this->z *= scalar; + return *this; +} + //! Operator for subtraction of vectors NiPoint3 NiPoint3::operator-(const NiPoint3& point) const { return NiPoint3(this->x - point.x, this->y - point.y, this->z - point.z); diff --git a/dCommon/NiPoint3.h b/dCommon/NiPoint3.h index c956b654..44c3c383 100644 --- a/dCommon/NiPoint3.h +++ b/dCommon/NiPoint3.h @@ -138,6 +138,8 @@ public: //! Operator for addition of vectors NiPoint3& operator+=(const NiPoint3& point); + NiPoint3& operator*=(const float scalar); + //! Operator for subtraction of vectors NiPoint3 operator-(const NiPoint3& point) const;