COGS
Computer Graphics Structures library
Exporter.h
1 /*
2  Copyright (C) Skeletex Research, s.r.o. - All Rights Reserved
3  Unauthorized copying of this file, via any medium is strictly prohibited
4  Proprietary and confidential
5 */
6 #ifndef COGS_EXPORTER_H
7 #define COGS_EXPORTER_H
8 #include <vector>
9 #include <memory>
10 #include <string>
11 #include <COGS/API.h>
12 
13 
14 
15 namespace cogs // forward declarations
16 {
17  class PointCloud;
18  class Scan;
19  struct Mesh;
20 }
21 
22 
23 
24 namespace cogs
25 {
26  // #TODO Update tested file formats.
42  class COGS_API Exporter
43  {
44  public:
45 
46  explicit Exporter();
47  Exporter(const Exporter &other) = delete;
48  Exporter(const Exporter &&other) = delete;
49  Exporter &operator=(const Exporter &other) = delete;
50  Exporter &operator=(const Exporter &&other) = delete;
51  ~Exporter();
52 
54  bool SaveToFile(const std::string &filename) const;
55 
57  void Clear();
58 
60  void AddPointCloud(const cogs::PointCloud &pointcloud);
61 
63  void AddScan(const cogs::Scan &scan);
64 
66  void AddMesh(const cogs::Mesh &mesh);
67 
68  private:
69  struct Impl;
70  std::unique_ptr<Impl> m;
71  [[nodiscard]] bool RunAssimpExporter(const std::string &filename) const;
72  [[nodiscard]] bool RunCogsExporter(const std::string &filename) const;
73 #ifdef COGS_EXR_EXPORT
74  [[nodiscard]] bool RunExrExporter(const std::string &filename) const;
75 #endif
76  };
77 
78 }
79 #endif /* !COGS_EXPORTER_H */
A Mesh is structure containing a point-cloud a triangulation and a material. Not all of these are req...
Definition: Mesh.h:21
Universal file exporter for COGS structures.
Definition: Exporter.h:42
Namespace of "Computer Graphic Structures" library, which implement many core classes and structures...
Definition: AabbHierarchy.h:8
Management class for a set of data points in a 3D space.
Definition: PointCloud.h:32
Set of 3D data points which are additionally organized over 2D grid.
Definition: Scan.h:22