Fix matrix to quaternion (and angleaxis) conversion for matrix expression.

This commit is contained in:
Gael Guennebaud
2015-12-01 09:45:56 +01:00
parent 844561939f
commit 6c02cbbb0f
2 changed files with 8 additions and 1 deletions

View File

@@ -739,8 +739,9 @@ template<typename Other>
struct quaternionbase_assign_impl<Other,3,3>
{
typedef typename Other::Scalar Scalar;
template<class Derived> static inline void run(QuaternionBase<Derived>& q, const Other& mat)
template<class Derived> static inline void run(QuaternionBase<Derived>& q, const Other& a_mat)
{
const typename internal::nested_eval<Other,2>::type mat(a_mat);
using std::sqrt;
// This algorithm comes from "Quaternion Calculus and Fast Animation",
// Ken Shoemake, 1987 SIGGRAPH course notes