16 #ifndef SURGSIM_MATH_MATHCONVERT_H
17 #define SURGSIM_MATH_MATHCONVERT_H
20 #include <Eigen/Geometry>
22 #include <yaml-cpp/yaml.h>
49 template <
typename Type,
int Rows,
int Cols,
int MOpt>
52 static Node encode(
const typename Eigen::Matrix<Type, Rows, Cols, MOpt>& rhs);
53 static bool decode(
const Node& node,
typename Eigen::Matrix<Type, Rows, Cols, MOpt>& rhs);
58 template <
class Type,
int QOpt>
61 static Node encode(
const typename Eigen::Quaternion<Type, QOpt>& rhs);
62 static bool decode(
const Node& node,
typename Eigen::Quaternion<Type, QOpt>& rhs);
67 template <
class Type,
int Dim,
int TMode,
int TOptions>
68 struct convert<typename
Eigen::Transform<Type, Dim, TMode, TOptions>>
70 static Node encode(
const typename Eigen::Transform<Type, Dim, TMode, TOptions>& rhs);
71 static bool decode(
const Node& node,
typename Eigen::Transform<Type, Dim, TMode, TOptions>& rhs);
76 template <
typename Type>
79 static Node encode(
const typename Eigen::AngleAxis<Type>& rhs);
80 static bool decode(
const Node& node,
typename Eigen::AngleAxis<Type>& rhs);
84 struct convert<std::shared_ptr<SurgSim::Math::Shape>>
86 static Node encode(
const std::shared_ptr<SurgSim::Math::Shape>& rhs);
87 static bool decode(
const Node& node, std::shared_ptr<SurgSim::Math::Shape>& rhs);
108 #endif // SURGSIM_MATH_MATHCONVERT_H