![]() |
COGS
Computer Graphics Structures library
|
Enables writing or cogs structures into files. More...
Public Member Functions | |
| DataBlockExporter () | |
| Creates exporter with default DataBlockManager object. | |
| DataBlockExporter (const std::shared_ptr< DataBlockManager > &datablock_manager) | |
| Creates exporter with custom DataBlockManager object. | |
| DataBlockExporter (const DataBlockExporter &)=delete | |
| DataBlockExporter & | operator= (const DataBlockExporter &)=delete |
| DataBlockExporter (const DataBlockExporter &&)=delete | |
| DataBlockExporter & | operator= (const DataBlockExporter &&)=delete |
| bool | OpenFile (const std::string &filename, bool overwrite_existing=false) |
| Opens file into which the data blocks can be written. More... | |
| void | CloseFile () |
| Finishes and closes currently opened file, disabling writers. | |
| DataBlockIndex | WritePointCloud (const cogs::PointCloud &cloud) |
| Adds the object to the export list. More... | |
| DataBlockIndex | WriteScan (const cogs::Scan &scan) |
| Adds the object to the export list. More... | |
| DataBlockIndex | WriteMesh (const cogs::Mesh &mesh) |
| Adds the object to the export list. More... | |
Static Public Attributes | |
| static uint8_t | VERSION |
| Current exporter version. | |
Enables writing or cogs structures into files.
Objects and data blocks for export are stored in the export list, and have to be valid until file is saved. Each object can be represented by one or multiple data blocks.
By default, exporter supports only predefined data blocks, but can be altered to support also custom data blocks, when user-defined DataBlockManager is provided during class construction.
For more information about cogs file io system, see page COGS File Format.
| bool cogs::io::DataBlockExporter::OpenFile | ( | const std::string & | filename, |
| bool | overwrite_existing = false |
||
| ) |
Opens file into which the data blocks can be written.
| filename | Name of the file. When extension is not provided, sets to "cogs". |
| overwrite_existing | Set to true is you wish to rewrite the file that already exists. |
| DataBlockIndex cogs::io::DataBlockExporter::WriteMesh | ( | const cogs::Mesh & | mesh | ) |
Adds the object to the export list.
| object_ref | Reference to object. Must be valid until saved. |
| DataBlockIndex cogs::io::DataBlockExporter::WritePointCloud | ( | const cogs::PointCloud & | cloud | ) |
Adds the object to the export list.
| object_ref | Reference to object. Must be valid until saved. |
| DataBlockIndex cogs::io::DataBlockExporter::WriteScan | ( | const cogs::Scan & | scan | ) |
Adds the object to the export list.
| object_ref | Reference to object. Must be valid until saved. |