6 #ifndef COGS_DATA_BLOCK_EXPORTER_H 7 #define COGS_DATA_BLOCK_EXPORTER_H 10 #include <COGS/io/DataBlockManager.h> 65 [[nodiscard]]
bool OpenFile(
const std::string &filename,
bool overwrite_existing =
false);
104 std::streampos nav_reference_position_;
105 std::vector<DataBlockInfo> navigation_;
106 std::shared_ptr<DataBlockManager> datablock_manager_;
107 std::unordered_map<DataBlockType, DataBlockIndex> index_counter_;
114 [[nodiscard]] std::unique_ptr<cogs::io::DataBlock> WriteCustom(
const DataBlockType &type);
121 template <
typename T>
124 auto dtb_ptr = WriteCustom(type);
125 return std::unique_ptr<T> {
static_cast<T *
>(dtb_ptr.release()) };
132 void ExportNavigation();
135 [[nodiscard]]
bool ExportDatablock(
DataBlock &dtb);
A Mesh is structure containing a point-cloud a triangulation and a material. Not all of these are req...
Definition: Mesh.h:21
Namespace of "Computer Graphic Structures" library, which implement many core classes and structures...
Definition: AabbHierarchy.h:8
size_t DataBlockIndex
Defines position index of the data block in a file.
Definition: DataBlock.h:13
Enables writing or cogs structures into files.
Definition: DataBlockExporter.h:40
Management class for a set of data points in a 3D space.
Definition: PointCloud.h:32
Definition of required interface for derived data blocks.
Definition: DataBlock.h:25
static uint8_t VERSION
Current exporter version.
Definition: DataBlockExporter.h:45
Set of 3D data points which are additionally organized over 2D grid.
Definition: Scan.h:22
std::string DataBlockType
Identifies data block instances. Each class derived from cogs::io::DataBlockType should have unique t...
Definition: DataBlock.h:22