Allow to construct EulerAngles from 3D vector directly.

Using assignment template struct to distinguish between 3D vector and 3D rotation matrix.
This commit is contained in:
Tal Hadad
2016-11-18 15:01:06 +02:00
parent 15eca2432a
commit 76b2a3e6e7
2 changed files with 57 additions and 18 deletions

View File

@@ -36,6 +36,12 @@ namespace Eigen
{
enum { value = Axis != 0 && Abs<Axis>::value <= 3 };
};
template<typename System,
typename Other,
int OtherRows=Other::RowsAtCompileTime,
int OtherCols=Other::ColsAtCompileTime>
struct eulerangles_assign_impl;
}
#define EIGEN_EULER_ANGLES_CLASS_STATIC_ASSERT(COND,MSG) typedef char static_assertion_##MSG[(COND)?1:-1]
@@ -269,6 +275,12 @@ namespace Eigen
template <typename _Scalar, class _System>
friend class Eigen::EulerAngles;
template<typename System,
typename Other,
int OtherRows,
int OtherCols>
friend struct internal::eulerangles_assign_impl;
};
#define EIGEN_EULER_SYSTEM_TYPEDEF(A, B, C) \