Verified Commit 4292b3ac authored by Justin Carpentier's avatar Justin Carpentier
Browse files

spatial/force: add specialization of ForceRef<const Vector6ArgType>

parent 0cab2617
......@@ -96,6 +96,33 @@ namespace pinocchio
DataRefType m_ref;
}; // class ForceRef<Vector6Like>
template<typename Vector6ArgType>
struct traits< ForceRef<const Vector6ArgType> >
{
typedef typename Vector6ArgType::Scalar Scalar;
typedef typename PINOCCHIO_EIGEN_PLAIN_TYPE(Vector6ArgType) Vector6;
enum {
LINEAR = 0,
ANGULAR = 3,
Options = Vector6::Options
};
typedef Eigen::Matrix<Scalar,3,1,Options> Vector3;
typedef Eigen::Matrix<Scalar,6,6,Options> Matrix6;
typedef Matrix6 ActionMatrixType;
typedef typename Vector6ArgType::template ConstFixedSegmentReturnType<3>::Type ConstLinearType;
typedef typename Vector6ArgType::template ConstFixedSegmentReturnType<3>::Type ConstAngularType;
typedef ConstLinearType LinearType;
typedef ConstAngularType AngularType;
typedef ForceTpl<Scalar,Options> ForcePlain;
typedef ForcePlain PlainReturnType;
typedef typename PINOCCHIO_EIGEN_REF_CONST_TYPE(Vector6ArgType) ConstDataRefType;
typedef ConstDataRefType ToVectorConstReturnType;
typedef ConstDataRefType DataRefType;
typedef DataRefType ToVectorReturnType;
typedef ForceRef<const Vector6ArgType> ForceRefType;
}; // traits ForceRef<const Vector6ArgType>
template<typename Vector6ArgType>
class ForceRef<const Vector6ArgType>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment