diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index c915d3330..bfdee4f1a 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -61,6 +61,15 @@ template class Vector3: public Vector { setX(x); setY(y); setZ(z); } + /** + * @brief Constructor + * @param other Two component vector + * @param z Z / B value + */ + inline Vector3(const Vector& other, T z = T(0)) { + setX(other[0]); setY(other[1]); setZ(z); + } + 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 */