mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-07 09:19:02 +08:00
Added x()/y() and z() access functions to translations.
This commit is contained in:
parent
089bd89512
commit
fbdf16d425
@ -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; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user