class cogs::Importer

Overview

#include <Importer.h>

class Importer {
public:
    // construction

    Importer(const Importer&);
    Importer(const Importer&&);
    virtual ~Importer();

    // methods

    static std::unique_ptr<cogs::Importer> Create(const std::string& filename, bool optimize_models = true);
    Importer& operator=(const Importer&);
    Importer& operator=(const Importer&&);
    virtual uint32_t GetPointCloudCount();
    virtual bool ReadPointCloud(cogs::PointCloud& out_cloud, uint32_t i = 0);
    virtual uint32_t GetScanCount();
    virtual bool ReadScan(cogs::Scan& out_scan, uint32_t id = 0);
    virtual uint32_t GetMeshCount();
    virtual bool ReadMesh(cogs::Mesh& out_mesh, uint32_t id = 0);

protected:
    // construction

    Importer(const std::string& filename);
};

Detailed Documentation

Methods

static std::unique_ptr<cogs::Importer> Create(const std::string& filename, bool optimize_models = true)

Create a specific importer for the provided file.

Parameters:

filename

Name of the file that should be imported.

optimize_models

Some importers may optimize data after import, you can disable by setting this to false.

Returns:

Pointer to the specific instance of importer object for your file, or nullptr if importer for such file does not exist.

virtual uint32_t GetPointCloudCount()

Returns number of available all point cloud objects.

virtual bool ReadPointCloud(cogs::PointCloud& out_cloud, uint32_t i = 0)

Loads object with specified index from file. Returns success.

virtual uint32_t GetScanCount()

Returns number of available point cloud objects with scan information.

virtual bool ReadScan(cogs::Scan& out_scan, uint32_t id = 0)

Loads object with specified index from file. Returns success.

virtual uint32_t GetMeshCount()

Returns number of available mesh objects.

virtual bool ReadMesh(cogs::Mesh& out_mesh, uint32_t id = 0)

Loads object with specified index from file. Returns success.