34 #ifndef OPEN_WALKER_CORE_EIGEN_QUATERNION_REF_H 35 #define OPEN_WALKER_CORE_EIGEN_QUATERNION_REF_H 37 #include <Eigen/Geometry> 43 template <
typename _Derived>
66 template <
typename _Derived>
70 typedef typename _Derived::Scalar Scalar;
71 typedef Eigen::Block<_Derived, 4, 1> Coefficients;
75 Alignment = internal::traits<Coefficients>::Alignment,
93 template <
typename _Derived>
94 class QuaternionRef :
public Eigen::QuaternionBase<QuaternionRef<_Derived> >
97 typedef _Derived Derived;
98 typedef Eigen::QuaternionBase<QuaternionRef<_Derived> > Base;
99 typedef typename Eigen::internal::traits<QuaternionRef>::Coefficients Coefficients;
119 coeffs_(ref, startRow, startCol)
133 using Base::operator=;
141 using Base::operator*=;
172 std::ostringstream out;
173 out << coeffs_.transpose();
186 #endif // OPEN_WALKER_CORE_EIGEN_QUATERNION_REF_H Definition: quaternion_ref.h:40
Coefficients & coeffs()
Get quaternion coefficients.
Definition: quaternion_ref.h:150
The QuaternionRef class.
Definition: quaternion_ref.h:44
Coefficients coeffs_
The quaternion coefficients in a Eigen::Block.
Definition: quaternion_ref.h:102
const Coefficients & coeffs() const
Get quaternion coefficients.
Definition: quaternion_ref.h:162
std::string toString() const
Conversion to std::string.
Definition: quaternion_ref.h:170
QuaternionRef(Derived &ref, int startRow=0, int startCol=0)
Default Constructor.
Definition: quaternion_ref.h:118