diff --git a/VirtualRobot/XML/mujoco/MeshConverter.cpp b/VirtualRobot/XML/mujoco/MeshConverter.cpp index 588341874f85b4ed3878fcc816ee13c52ada5405..c79d41ba46af915eb9497cb799c31eea48c1bb6c 100644 --- a/VirtualRobot/XML/mujoco/MeshConverter.cpp +++ b/VirtualRobot/XML/mujoco/MeshConverter.cpp @@ -233,9 +233,10 @@ bool MeshConverter::runMeshlabserverCommand( } } -MeshConverter::MeshConverter() = default; +MeshConverter::MeshConverter() = default; +/* float MeshConverter::getScaling() const { return scaling; @@ -265,5 +266,6 @@ Mesh MeshConverter::toMujoco(const TriMeshModel& triMeshModel) { return toMujoco(triMeshModel, scaling); } +*/ } diff --git a/VirtualRobot/XML/mujoco/MeshConverter.h b/VirtualRobot/XML/mujoco/MeshConverter.h index ada6e56896b90e21ff162caa88b2823c0ee3df2f..b438379dc7963fd2039551e4a2c31ee9a84a1742 100644 --- a/VirtualRobot/XML/mujoco/MeshConverter.h +++ b/VirtualRobot/XML/mujoco/MeshConverter.h @@ -57,6 +57,33 @@ namespace VirtualRobot::mujoco bool skipIfExists = true); + private: + + /// Check whether the command `MESHLABSERVER` is available using `system("which ...")`. + static bool checkMeshlabserverAvailable(); + + /** + * @brief Run the command converting `sourceFile` to `targetFile`. + * @return True if the command returned without error, false otherwise. + */ + static bool runMeshlabserverCommand(const std::filesystem::path& sourceFile, + const std::filesystem::path& targetFile); + + + /// Command used to convert mesh files to STL. + static const std::string MESHLABSERVER; + + + + private: + + /// Private constructor. + MeshConverter(); + + + /* Disabled stateful API because its methods are ambiguous to the + * static API. + public: // STATEFUL API. @@ -85,31 +112,15 @@ namespace VirtualRobot::mujoco mujoco::Mesh fromVirtualRobot(const VirtualRobot::TriMeshModel& triMeshModel); /// Construct mujoco::Mesh from a VirtualRobot::TriMeshModel. - mujoco::Mesh toMujoco(const VirtualRobot::TriMeshModel& triMeshModel); - - - private: - - /// Check whether the command `MESHLABSERVER` is available using `system("which ...")`. - static bool checkMeshlabserverAvailable(); - - /** - * @brief Run the command converting `sourceFile` to `targetFile`. - * @return True if the command returned without error, false otherwise. - */ - static bool runMeshlabserverCommand(const std::filesystem::path& sourceFile, - const std::filesystem::path& targetFile); - - - /// Command used to convert mesh files to STL. - static const std::string MESHLABSERVER; + mujoco::Mesh toMujoco(const VirtualRobot::TriMeshModel& triMeshModel); + private: /// The scaling. float scaling = 1.0f; - + */ }; }