| 81 | } |
| 82 | |
| 83 | static inline Sim3d FromMatrix(const Eigen::Matrix3x4d& matrix) { |
| 84 | Sim3d t; |
| 85 | t.scale() = matrix.col(0).norm(); |
| 86 | t.rotation() = |
| 87 | Eigen::Quaterniond(matrix.leftCols<3>() / t.scale()).normalized(); |
| 88 | t.translation() = matrix.rightCols<1>(); |
| 89 | return t; |
| 90 | } |
| 91 | |
| 92 | // Read from or write to text file without loss of precision. |
| 93 | void ToFile(const std::filesystem::path& path) const; |
nothing calls this directly
no test coverage detected