diff --git a/src/Math/Vector4.h b/src/Math/Vector4.h index 01c2e0bd3..99334cd45 100644 --- a/src/Math/Vector4.h +++ b/src/Math/Vector4.h @@ -52,6 +52,15 @@ template class Vector4: public Vector { setX(x); setY(y); setZ(z); setW(w); } + /** + * @brief Constructor + * @param other Three component vector + * @param w W / A value + */ + inline Vector4(const Vector& other, T w = T(1)) { + setX(other[0]); setY(other[1]); setZ(other[2]); setW(w); + } + inline T x() const { return Vector::at(0); } /**< @brief X component */ inline T y() const { return Vector::at(1); } /**< @brief Y component */ inline T z() const { return Vector::at(2); } /**< @brief Z component */