ProjectStore.hpp 993 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include "lib3mf_implicit.hpp"
  3. #include "OptiTrackPoint.hpp"
  4. #include <string>
  5. typedef struct {
  6. bool OptiTrack;
  7. bool EMFTrack;
  8. bool SteamVRTrack;
  9. } ExportSettings;
  10. class ProjectStore {
  11. public:
  12. // Create an empty project
  13. ProjectStore();
  14. // Destructor
  15. ~ProjectStore();
  16. // Load a mesh
  17. void loadMesh(std::string meshFile);
  18. // Load a project
  19. bool loadProject(std::string projectFile);
  20. // Save the project to the loaded file
  21. bool saveProject();
  22. // Save the project to a new file
  23. bool saveProject(std::string projectFile);
  24. // Export the project
  25. bool exportProject(std::string path, ExportSettings settings);
  26. private:
  27. bool projectLoaded;
  28. Lib3MF::PWrapper _wrapper;
  29. Lib3MF::PModel _project;
  30. std::string _projectFile;
  31. std::vector<OptiTrackPoint> _optiTrackPoints;
  32. void load3mfLib();
  33. void render3MFMesh(const std::vector<Lib3MF::sPosition> verticesBuffer, const std::vector<Lib3MF::sTriangle> triangleBuffer);
  34. void exportMetaData();
  35. };