14 typedef typename Vector6ArgType::Scalar Scalar;
20 Options = Vector6::Options
22 typedef Eigen::Matrix<Scalar, 3, 1, Options> Vector3;
23 typedef Eigen::Matrix<Scalar, 4, 4, Options> Matrix4;
24 typedef Eigen::Matrix<Scalar, 6, 6, Options> Matrix6;
25 typedef Matrix6 ActionMatrixType;
26 typedef Matrix4 HomogeneousMatrixType;
33 typedef typename PINOCCHIO_EIGEN_REF_TYPE(
Vector6ArgType) DataRefType;
34 typedef DataRefType ToVectorReturnType;
77 using Base::operator=;
82 using Base::__minus__;
84 using Base::__opposite__;
103 ToVectorConstReturnType toVector_impl()
const
107 ToVectorReturnType toVector_impl()
113 ConstAngularType angular_impl()
const
115 return ConstAngularType(m_ref.derived(), ANGULAR);
117 ConstLinearType linear_impl()
const
119 return ConstLinearType(m_ref.derived(), LINEAR);
121 AngularType angular_impl()
123 return m_ref.template segment<3>(ANGULAR);
125 LinearType linear_impl()
127 return m_ref.template segment<3>(LINEAR);
130 template<
typename V3>
131 void angular_impl(
const Eigen::MatrixBase<V3> & w)
133 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3, 3);
137 template<
typename V3>
138 void linear_impl(
const Eigen::MatrixBase<V3> & v)
140 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3, 3);
145 template<
typename S1,
int O1>
146 MotionPlain __plus__(
const MotionTpl<S1, O1> & v)
const
148 return MotionPlain(m_ref + v.toVector());
151 template<
typename Vector6Like>
152 MotionPlain __plus__(
const MotionRef<Vector6ArgType> & v)
const
154 return MotionPlain(m_ref + v.toVector());
157 template<
typename S1,
int O1>
158 MotionPlain __minus__(
const MotionTpl<S1, O1> & v)
const
160 return MotionPlain(m_ref - v.toVector());
163 template<
typename Vector6Like>
164 MotionPlain __minus__(
const MotionRef<Vector6ArgType> & v)
const
166 return MotionPlain(m_ref - v.toVector());
169 template<
typename S1,
int O1>
170 MotionRef & __pequ__(
const MotionTpl<S1, O1> & v)
172 m_ref += v.toVector();
176 template<
typename Vector6Like>
177 MotionRef & __pequ__(
const MotionRef<Vector6ArgType> & v)
179 m_ref += v.toVector();
183 template<
typename S1,
int O1>
184 MotionRef & __mequ__(
const MotionTpl<S1, O1> & v)
186 m_ref -= v.toVector();
190 template<
typename Vector6Like>
191 MotionRef & __mequ__(
const MotionRef<Vector6ArgType> & v)
193 m_ref -= v.toVector();
197 template<
typename OtherScalar>
198 MotionPlain __mult__(
const OtherScalar & alpha)
const
200 return MotionPlain(alpha * m_ref);
208 inline PlainReturnType plain()
const
210 return PlainReturnType(m_ref);
221 typedef typename Vector6ArgType::Scalar Scalar;
227 Options = Vector6::Options
229 typedef Eigen::Matrix<Scalar, 3, 1, Options> Vector3;
230 typedef Eigen::Matrix<Scalar, 4, 4, Options> Matrix4;
231 typedef Eigen::Matrix<Scalar, 6, 6, Options> Matrix6;
232 typedef Matrix6 ActionMatrixType;
233 typedef Matrix4 HomogeneousMatrixType;
236 typedef ConstLinearType LinearType;
237 typedef ConstAngularType AngularType;
257 using Base::operator=;
261 using Base::__minus__;
262 using Base::__mult__;
263 using Base::__opposite__;
264 using Base::__plus__;
280 ToVectorConstReturnType toVector_impl()
const
286 ConstAngularType angular_impl()
const
288 return ConstAngularType(m_ref.derived(), ANGULAR);
290 ConstLinearType linear_impl()
const
292 return ConstLinearType(m_ref.derived(), LINEAR);
296 template<
typename S1,
int O1>
297 MotionPlain __plus__(
const MotionTpl<S1, O1> & v)
const
299 return MotionPlain(m_ref + v.toVector());
302 template<
typename Vector6Like>
303 MotionPlain __plus__(
const MotionRef<Vector6ArgType> & v)
const
305 return MotionPlain(m_ref + v.toVector());
308 template<
typename S1,
int O1>
309 MotionPlain __minus__(
const MotionTpl<S1, O1> & v)
const
311 return MotionPlain(m_ref - v.toVector());
314 template<
typename Vector6Like>
315 MotionPlain __minus__(
const MotionRef<Vector6ArgType> & v)
const
317 return MotionPlain(m_ref - v.toVector());
320 template<
typename OtherScalar>
321 MotionPlain __mult__(
const OtherScalar & alpha)
const
323 return MotionPlain(alpha * m_ref);
331 inline PlainReturnType plain()
const
333 return PlainReturnType(m_ref);