5 #ifndef __pinocchio_cartesian_axis_hpp__
6 #define __pinocchio_cartesian_axis_hpp__
22 typedef Eigen::Matrix<double, 3, 1>
Vector3;
24 template<
typename V3_in,
typename V3_out>
26 cross(
const Eigen::MatrixBase<V3_in> &
vin,
const Eigen::MatrixBase<V3_out> & vout);
36 template<
typename Scalar,
typename V3_in,
typename V3_out>
39 const Eigen::MatrixBase<V3_in> &
vin,
40 const Eigen::MatrixBase<V3_out> & vout);
42 template<
typename Scalar,
typename V3>
51 template<
typename Scalar>
54 typedef Eigen::Matrix<Scalar, dim, 1> ReturnType;
56 for (Eigen::DenseIndex
i = 0;
i <
dim; ++
i)
62 template<
typename Scalar>
68 template<
typename Vector3Like>
69 static void setTo(
const Eigen::MatrixBase<Vector3Like> v3)
74 for (Eigen::DenseIndex
i = 0;
i <
dim; ++
i)
78 template<
typename Scalar>
79 static Eigen::Matrix<Scalar, 3, 1>
vector()
81 typedef Eigen::Matrix<Scalar, 3, 1>
Vector3;
82 return Vector3::Unit(
axis);
87 return vector<double>();
93 template<
typename V3_in,
typename V3_out>
95 const Eigen::MatrixBase<V3_in> & vin,
const Eigen::MatrixBase<V3_out> & vout)
97 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in, 3)
98 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out, 3)
106 template<
typename V3_in,
typename V3_out>
108 const Eigen::MatrixBase<V3_in> & vin,
const Eigen::MatrixBase<V3_out> & vout)
110 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in, 3)
111 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out, 3)
119 template<
typename V3_in,
typename V3_out>
121 const Eigen::MatrixBase<V3_in> & vin,
const Eigen::MatrixBase<V3_out> & vout)
123 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in, 3)
124 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out, 3)
132 template<
typename Scalar,
typename V3_in,
typename V3_out>
134 const Scalar & s,
const Eigen::MatrixBase<V3_in> & vin,
const Eigen::MatrixBase<V3_out> & vout)
136 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in, 3)
137 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out, 3)
140 vout_[1] = -s * vin[2];
141 vout_[2] = s * vin[1];
145 template<
typename Scalar,
typename V3_in,
typename V3_out>
147 const Scalar & s,
const Eigen::MatrixBase<V3_in> & vin,
const Eigen::MatrixBase<V3_out> & vout)
149 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in, 3)
150 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out, 3)
152 vout_[0] = s * vin[2];
154 vout_[2] = -s * vin[0];
158 template<
typename Scalar,
typename V3_in,
typename V3_out>
160 const Scalar & s,
const Eigen::MatrixBase<V3_in> & vin,
const Eigen::MatrixBase<V3_out> & vout)
162 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_in, 3)
163 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(V3_out, 3)
165 vout_[0] = -s * vin[1];
166 vout_[1] = s * vin[0];
181 #endif // __pinocchio_cartesian_axis_hpp__