30 #ifndef _RL_MATH_ARTICULATEDBODYINERTIA_H_
31 #define _RL_MATH_ARTICULATEDBODYINERTIA_H_
45 template<
typename Scalar >
49 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
63 typedef ::Eigen::Matrix< Scalar, 3, 3 >
MassType;
71 template<
typename OtherDerived >
74 inertiaData(other.template topLeftCorner< 3, 3 >()),
75 massData(other.template bottomRightCorner< 3, 3 >())
116 res.template topLeftCorner< 3, 3 >() =
inertia();
117 res.template topRightCorner< 3, 3 >() =
cog();
118 res.template bottomLeftCorner< 3, 3 >() =
cog().transpose();
119 res.template bottomRightCorner< 3, 3 >() =
mass();
123 template<
typename OtherDerived >
126 cog() = other.template topRightCorner< 3, 3 >();
127 inertia() = other.template topLeftCorner< 3, 3 >();
128 mass() = other.template bottomRightCorner< 3, 3 >();
132 template<
typename OtherScalar >
153 template<
typename OtherScalar >
157 res.
cog() =
cog() * other;
163 template<
typename OtherScalar >
166 template<
typename OtherScalar >
170 res.
cog() =
cog() / other;
180 mass().setIdentity();
203 #endif // _RL_MATH_ARTICULATEDBODYINERTIA_H_