14 typedef _Scalar Scalar;
15 typedef Eigen::Matrix<Scalar, 3, 1, _Options> Vector3;
16 typedef Eigen::Matrix<Scalar, 6, 1, _Options> Vector6;
17 typedef Eigen::Matrix<Scalar, 6, 6, _Options> Matrix6;
18 typedef typename PINOCCHIO_EIGEN_REF_CONST_TYPE(Vector6) ToVectorConstReturnType;
19 typedef typename PINOCCHIO_EIGEN_REF_TYPE(Vector6) ToVectorReturnType;
20 typedef typename Vector6::template FixedSegmentReturnType<3>::Type LinearType;
21 typedef typename Vector6::template FixedSegmentReturnType<3>::Type AngularType;
22 typedef typename Vector6::template ConstFixedSegmentReturnType<3>::Type ConstLinearType;
23 typedef typename Vector6::template ConstFixedSegmentReturnType<3>::Type ConstAngularType;
36 class ForceTpl :
public ForceDense<ForceTpl<_Scalar, _Options>>
39 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
40 typedef ForceDense<ForceTpl> Base;
41 FORCE_TYPEDEF_TPL(ForceTpl);
47 using Base::operator=;
48 using Base::operator!=;
57 template<
typename V1,
typename V2>
58 ForceTpl(
const Eigen::MatrixBase<V1> & v,
const Eigen::MatrixBase<V2> & w)
60 EIGEN_STATIC_ASSERT_VECTOR_ONLY(V1);
61 EIGEN_STATIC_ASSERT_VECTOR_ONLY(V2);
67 explicit ForceTpl(
const Eigen::MatrixBase<V6> & v)
70 EIGEN_STATIC_ASSERT_VECTOR_ONLY(V6);
73 ForceTpl(
const ForceTpl & clone)
78 template<
typename S2,
int O2>
79 explicit ForceTpl(
const ForceTpl<S2, O2> & other)
90 ForceTpl & operator=(
const ForceTpl & clone)
97 explicit ForceTpl(
const ForceTpl<Scalar, O2> & clone)
102 template<
typename M2>
103 explicit ForceTpl(
const ForceDense<M2> & clone)
110 static ForceTpl Zero()
112 return ForceTpl(Vector6::Zero());
114 static ForceTpl Random()
116 return ForceTpl(Vector6::Random());
119 ToVectorConstReturnType toVector_impl()
const 123 ToVectorReturnType toVector_impl()
129 ConstAngularType angular_impl()
const 131 return m_data.template segment<3>(ANGULAR);
133 ConstLinearType linear_impl()
const 135 return m_data.template segment<3>(LINEAR);
137 AngularType angular_impl()
139 return m_data.template segment<3>(ANGULAR);
141 LinearType linear_impl()
143 return m_data.template segment<3>(LINEAR);
146 template<
typename V3>
147 void angular_impl(
const Eigen::MatrixBase<V3> & w)
149 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3, 3);
152 template<
typename V3>
153 void linear_impl(
const Eigen::MatrixBase<V3> & v)
155 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3, 3);
165 template<
typename NewScalar>
166 ForceTpl<NewScalar, Options>
cast()
const 168 typedef ForceTpl<NewScalar, Options>
ReturnType;