22 typedef Eigen::Matrix<Scalar, 3, 1, Options> Vector3;
23 typedef Eigen::Matrix<Scalar, 3, 3, Options> Matrix3;
24 typedef Eigen::Matrix<Scalar, 6, 1, Options> Vector6;
25 typedef Eigen::Matrix<Scalar, 6, 6, Options> Matrix6;
28 typedef Eigen::Matrix<Scalar, 3, Eigen::Dynamic, Options> Matrix3x;
29 typedef Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options> Matrix6x;
99 Block(ForceSetTpl & ref,
const int & idx,
const int & len)
106 Eigen::Block<ForceSetTpl::Matrix3x> linear()
108 return ref.m_f.block(0, idx, 3, len);
110 Eigen::Block<ForceSetTpl::Matrix3x> angular()
112 return ref.m_n.block(0, idx, 3, len);
114 Eigen::Block<const ForceSetTpl::Matrix3x> linear()
const 116 return ((
const ForceSetTpl::Matrix3x &)(ref.m_f)).block(0, idx, 3, len);
118 Eigen::Block<const ForceSetTpl::Matrix3x> angular()
const 120 return ((
const ForceSetTpl::Matrix3x &)(ref.m_n)).block(0, idx, 3, len);
123 ForceSetTpl::Matrix6x matrix()
const 125 ForceSetTpl::Matrix6x res(6, len);
126 res << linear(), angular();
130 Block & operator=(
const ForceSetTpl &
copy)
132 assert(
copy.size == len);
133 linear() =
copy.linear();
134 angular() =
copy.angular();
140 assert(
copy.len == len);
149 Block & operator=(
const Eigen::MatrixBase<D> & m)
151 eigen_assert(D::RowsAtCompileTime == 6);
152 assert(m.cols() == len);
153 linear() = m.template topRows<3>();
154 angular() = m.template bottomRows<3>();
163 Matrix3x Rf((m.rotation() * linear()));
164 return ForceSetTpl(Rf,
skew(m.translation()) * Rf + m.rotation() * angular());
173 m.rotation().transpose() * linear(),
174 m.rotation().transpose() * (angular() -
skew(m.translation()) * linear()));