diff --git a/include/hpp/fcl/eigen/product.h b/include/hpp/fcl/eigen/product.h index 8c73f47c24f7f4f554386bed981eea000fa09a45..a6f2249ac0f61ea6e00ddc5ef8baf0693722a0e4 100644 --- a/include/hpp/fcl/eigen/product.h +++ b/include/hpp/fcl/eigen/product.h @@ -29,8 +29,8 @@ struct FclProduct #define FCL_EIGEN_MAKE_PRODUCT_OPERATOR() \ template <typename OtherDerived> \ - EIGEN_STRONG_INLINE const typename FclProduct<const FCL_EIGEN_CURRENT_CLASS, const OtherDerived>::ProductType \ + EIGEN_STRONG_INLINE const typename FclProduct<const typename FCL_EIGEN_CURRENT_CLASS::Base, const OtherDerived>::ProductType \ operator*(const MatrixBase<OtherDerived>& other) const \ { \ - return FclProduct<const FCL_EIGEN_CURRENT_CLASS, const OtherDerived>::run (*this, other.derived()); \ + return FclProduct<const typename FCL_EIGEN_CURRENT_CLASS::Base, const OtherDerived>::run (*this, other.derived()); \ } diff --git a/include/hpp/fcl/eigen/taylor_operator.h b/include/hpp/fcl/eigen/taylor_operator.h index 15351e0b89d2a1b7c5229995a64a1d32408cc4a9..fa02f2b7aea2b7454b255e0c0cb93e35cf673a2c 100644 --- a/include/hpp/fcl/eigen/taylor_operator.h +++ b/include/hpp/fcl/eigen/taylor_operator.h @@ -16,7 +16,7 @@ template<> struct TaylorReturnType<3> { typedef TMatrix3 type; typedef Matrix3f template<typename Derived> typename TaylorReturnType<Derived::ColsAtCompileTime>::type operator * (const FclType<Derived>& v, const TaylorModel& a) { - const typename TaylorReturnType<Derived::ColsAtCompileTime>::eigen_type b = v.derived(); + const typename TaylorReturnType<Derived::ColsAtCompileTime>::eigen_type b = v.fcl(); return b * a; } diff --git a/include/hpp/fcl/eigen/vec_3fx.h b/include/hpp/fcl/eigen/vec_3fx.h index 338567d4d32de24fe3e5c17047f701caa9ef62e2..f6bf97725f52f590725a4789be68d4ab32695853 100644 --- a/include/hpp/fcl/eigen/vec_3fx.h +++ b/include/hpp/fcl/eigen/vec_3fx.h @@ -168,6 +168,9 @@ namespace Eigen { OuterStrideAtCompileTime = traits_base::OuterStrideAtCompileTime }; }; + + template <typename Derived> struct remove_fcl { typedef Derived type; }; + template <> template <typename Derived> struct remove_fcl <FclOp<Derived> > { typedef Derived type; }; } template <typename Derived> @@ -630,7 +633,7 @@ static inline typename Derived::Scalar triple( const FclType<Derived>& y, const FclType<Derived>& z) { - return x.derived().dot(y.derived().cross(z.derived())); + return x.fcl().dot(y.fcl().cross(z.fcl())); } @@ -806,9 +809,9 @@ void eigen(const FclType<Matrix>& m, typename Matrix::Scalar dout[3], Vector* vo } template<typename Derived> -Eigen::FclOp<Eigen::Transpose<const Derived> > transpose(const FclType<Derived>& R) +Eigen::FclOp<Eigen::Transpose<const typename Eigen::internal::remove_fcl<Derived>::type> > transpose(const FclType<Derived>& R) { - return Eigen::FclOp<Eigen::Transpose<const Derived > > (R.fcl()); + return Eigen::FclOp<Eigen::Transpose<const typename Eigen::internal::remove_fcl<Derived>::type > > (R.fcl()); } template<typename T, int _Options>