Added x()/y() and z() access functions to translations.

This commit is contained in:
Hauke Heibel 2010-03-19 20:11:40 +01:00
parent 089bd89512
commit fbdf16d425

View File

@ -81,6 +81,20 @@ public:
/** Constructs and initialize the translation transformation from a vector of translation coefficients */
explicit inline Translation(const VectorType& vector) : m_coeffs(vector) {}
/** \brief Retruns the x-translation by value. **/
inline Scalar x() const { return m_coeffs.x(); }
/** \brief Retruns the y-translation by value. **/
inline Scalar y() const { return m_coeffs.y(); }
/** \brief Retruns the z-translation by value. **/
inline Scalar z() const { return m_coeffs.z(); }
/** \brief Retruns the x-translation as a reference. **/
inline Scalar& x() { return m_coeffs.x(); }
/** \brief Retruns the y-translation as a reference. **/
inline Scalar& y() { return m_coeffs.y(); }
/** \brief Retruns the z-translation as a reference. **/
inline Scalar& z() { return m_coeffs.z(); }
const VectorType& vector() const { return m_coeffs; }
VectorType& vector() { return m_coeffs; }