5 #ifndef __pinocchio_cartesian_axis_hpp__ 6 #define __pinocchio_cartesian_axis_hpp__ 8 #include "pinocchio/fwd.hpp" 18 template<
typename V3_in,
typename V3_out>
19 inline static void cross(
const Eigen::MatrixBase<V3_in> &
vin,
20 const Eigen::MatrixBase<V3_out> & vout);
30 template<
typename Scalar,
typename V3_in,
typename V3_out>
32 const Eigen::MatrixBase<V3_in> & vin,
33 const Eigen::MatrixBase<V3_out> & vout);
35 template<
typename Scalar,
typename V3>
37 const Eigen::MatrixBase<V3> & vin)
44 template<
typename Scalar>
47 typedef Eigen::Matrix<Scalar,dim,1> ReturnType;
49 for(Eigen::DenseIndex
i = 0;
i <
dim; ++
i)
55 template<
typename Scalar>
56 friend inline Eigen::Matrix<Scalar,dim,1>
62 template<
typename Vector3Like>
63 static void setTo(
const Eigen::MatrixBase<Vector3Like> v3)
68 for(Eigen::DenseIndex
i = 0;
i <
dim; ++
i)
75 template<
typename V3_in,
typename V3_out>
77 const Eigen::MatrixBase<V3_out> & vout)
79 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in,3)
80 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out,3)
82 vout_[0] = 0.; vout_[1] = -vin[2]; vout_[2] = vin[1];
86 template<
typename V3_in,
typename V3_out>
88 const Eigen::MatrixBase<V3_out> & vout)
90 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in,3)
91 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out,3)
93 vout_[0] = vin[2]; vout_[1] = 0.; vout_[2] = -vin[0];
97 template<
typename V3_in,
typename V3_out>
99 const Eigen::MatrixBase<V3_out> & vout)
101 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in,3)
102 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out,3)
104 vout_[0] = -vin[1]; vout_[1] = vin[0]; vout_[2] = 0.;
108 template<
typename Scalar,
typename V3_in,
typename V3_out>
110 const Eigen::MatrixBase<V3_in> &
vin,
111 const Eigen::MatrixBase<V3_out> & vout)
113 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in,3)
114 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out,3)
116 vout_[0] = 0.; vout_[1] = -s*vin[2]; vout_[2] = s*vin[1];
120 template<
typename Scalar,
typename V3_in,
typename V3_out>
122 const Eigen::MatrixBase<V3_in> &
vin,
123 const Eigen::MatrixBase<V3_out> & vout)
125 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in,3)
126 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out,3)
128 vout_[0] = s*vin[2]; vout_[1] = 0.; vout_[2] = -s*vin[0];
132 template<
typename Scalar,
typename V3_in,
typename V3_out>
134 const Eigen::MatrixBase<V3_in> &
vin,
135 const Eigen::MatrixBase<V3_out> & vout)
137 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in,3)
138 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out,3)
140 vout_[0] = -s*vin[1]; vout_[1] = s*vin[0]; vout_[2] = 0.;
149 #endif // __pinocchio_cartesian_axis_hpp__
static void alphaCross(const Scalar &s, const Eigen::MatrixBase< V3_in > &vin, const Eigen::MatrixBase< V3_out > &vout)
#define PINOCCHIO_EIGEN_CONST_CAST(TYPE, OBJ)
Macro for an automatic const_cast.
static void cross(const Eigen::MatrixBase< V3_in > &vin, const Eigen::MatrixBase< V3_out > &vout)
static const Eigen::MatrixBase< V3 > & vin
Eigen::Matrix< Scalar, dim, 1 > operator*(const Scalar &s) const
Main pinocchio namespace.
friend Eigen::Matrix< Scalar, dim, 1 > operator*(const Scalar &s, const CartesianAxis &)
static PINOCCHIO_EIGEN_PLAIN_TYPE(V3) cross(const Eigen
static void setTo(const Eigen::MatrixBase< Vector3Like > v3)