hat.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2022 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
7 #include <Eigen/Core>
8 
9 namespace mc_rbdyn
10 {
11 
12 inline Eigen::Matrix3d hat(const Eigen::Vector3d & v)
13 {
14  Eigen::Matrix3d ret;
15  // clang-format off
16  ret << 0, -v.z(), v.y(),
17  v.z(), 0, -v.x(),
18  -v.y(), v.x(), 0;
19  // clang-format on
20  return ret;
21 }
22 
23 } // namespace mc_rbdyn
mc_rbdyn::hat
Eigen::Matrix3d hat(const Eigen::Vector3d &v)
Definition: hat.h:12
mc_rbdyn
Definition: generic_gripper.h:14