| 48 | } |
| 49 | |
| 50 | Sim3d Sim3d::FromFile(const std::filesystem::path& path) { |
| 51 | std::ifstream file(path); |
| 52 | THROW_CHECK(file.good()) << path; |
| 53 | file.imbue(std::locale::classic()); |
| 54 | Sim3d t; |
| 55 | THROW_CHECK(file >> t.scale() >> t.rotation().w() >> t.rotation().x() >> |
| 56 | t.rotation().y() >> t.rotation().z() >> t.translation().x() >> |
| 57 | t.translation().y() >> t.translation().z()); |
| 58 | return t; |
| 59 | } |
| 60 | |
| 61 | std::ostream& operator<<(std::ostream& stream, const Sim3d& tform) { |
| 62 | const static Eigen::IOFormat kVecFmt( |
nothing calls this directly
no test coverage detected