|
| template<> |
| void | from_json< Eigen::Vector3f > (const ::simox::json::json &j, Eigen::MatrixBase< Eigen::Vector3f > &vector) |
| |
| template<> |
| void | from_json< Eigen::Matrix4f > (const ::simox::json::json &j, Eigen::MatrixBase< Eigen::Matrix4f > &matrix) |
| |
| template<typename Derived > |
| void | to_json (simox::json::json &j, const Eigen::MatrixBase< Derived > &matrix) |
| | Writes the matrix as list of rows. More...
|
| |
| template<typename Derived > |
| void | from_json (const simox::json::json &j, Eigen::MatrixBase< Derived > &matrix) |
| | Reads the matrix from list of rows. More...
|
| |
| template<> |
| void | from_json< Eigen::Vector3f > (const simox::json::json &j, Eigen::MatrixBase< Eigen::Vector3f > &vector) |
| | If j is an object, reads vector from x, y, z keys. Otherwise, reads it as matrix. More...
|
| |
| template<> |
| void | from_json< Eigen::Matrix4f > (const simox::json::json &j, Eigen::MatrixBase< Eigen::Matrix4f > &matrix) |
| | Reads a 4x4 matrix from list of rows or pos and ori keys. More...
|
| |
| template<typename Derived > |
| void | to_json (simox::json::json &j, const Eigen::QuaternionBase< Derived > &quat) |
| | Writes the quaternion with qw, qx, qy, qz keys. More...
|
| |
| template<typename Derived > |
| void | from_json (const simox::json::json &j, Eigen::QuaternionBase< Derived > &quat) |
| | Reads the quaternion from qw, qx, qy, qz keys. More...
|
| |
| template<typename T , int N, int Type> |
| void | to_json (simox::json::json &j, const Eigen::Transform< T, N, Type > &transform) |
| |
| template<typename T , int N, int Type> |
| void | from_json (const simox::json::json &j, Eigen::Transform< T, N, Type > &transform) |
| |
Provide to_json() and from_json() overloads for simox::json::json, which allows simple syntax like:
Eigen::Matrix3f in, out;
j = in;
out = j.
get<Eigen::Matrix3f>();
- Test:
- VirtualRobotJsonEigenConversionTest
- See also
- https://github.com/nlohmann/json#arbitrary-types-conversions