6 #ifndef COGS_DATA_BLOCK_IMPORTER_H 7 #define COGS_DATA_BLOCK_IMPORTER_H 8 #include <unordered_map> 12 #include <COGS/io/DataBlockManager.h> 58 bool OpenFile(
const std::string &filename);
64 [[nodiscard]]
bool IsFileOpen()
const;
67 [[nodiscard]]
size_t GetPointCloudCount()
const;
73 [[nodiscard]]
size_t GetScanCount()
const;
79 [[nodiscard]]
size_t GetMeshCount()
const;
91 std::streampos position;
93 std::shared_ptr<DataBlock> block;
96 std::shared_ptr<T> CastBlock()
const 98 return std::static_pointer_cast<T>(block);
102 std::shared_ptr<DataBlockManager> datablock_manager_;
104 uint8_t file_version_;
105 std::unordered_map<DataBlockType, std::vector<DataBlockInfo>> navigation_;
108 [[nodiscard]]
size_t GetDatablockCount(
const DataBlockType &type)
const;
114 bool ImportHeader(std::istream &in_s);
117 bool ImportNavigation(std::istream &in_s);
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
Enables reading of cogs structures into files.
Definition: DataBlockImporter.h:42
size_t DataBlockIndex
Defines position index of the data block in a file.
Definition: DataBlock.h:13
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
std::string DataBlockType
Identifies data block instances. Each class derived from cogs::io::DataBlockType should have unique t...
Definition: DataBlock.h:22