# class hiro::modules::ScanResource

## Overview

Resource that allows visualization of a cogs::PointCloud structure. More…

    #include <ScanResource.h>

    class ScanResource: public hiro::modules::PointCloudResource {
    public:
        // construction

        ScanResource(const std::string& name, const cogs::Scan& sc);

        // methods

        virtual PGadget CreateGadget();
        const glm::uvec2& GetResolution() const;
        const cogs::ScanCameraParams& GetCameraParams() const;
        const glm::vec3& GetCameraPosition() const;
        const glm::vec3& GetCameraUp() const;
        const glm::mat3& GetCameraBasis() const;
        const utils::BasisDefinition& GetBasisDefinition() const;
    };

### Inherited Members

    public:
        // structs

        struct DataRecord;

        // fields

        const hiro::ResourceId ID;

        // methods

        virtual hiro::PGadget CreateGadget() = 0;
        void ResetGadgets();
        virtual void Update(float delta_time);
        virtual hiro::PGadget CreateGadget();
        uint32_t GetPointCount() const;
        hiro::draw::PPointCloudRenderer GetRenderer() const;
        glm::vec3 GetCenterOfMass() const;
        float GetApproxRadius() const;
        bool IsColoringAvailable() const;
        const std::vector<cogs::Color3f>* GetColoringOption(const uint32_t id) const;
        const std::vector<std::string> GetColoringOptionNames() const;
        bool HasFloatData() const;
        const hiro::modules::PointCloudResource::DataRecord* GetFDataOption(const uint32_t id) const;
        const std::vector<std::string> GetFDataOptionNames() const;
        bool HasNormals() const;
        std::string GetSpaceId() const;
        std::optional<utils::SpaceDefinition> GetSpace() const;

    protected:
        // fields

        hiro::draw::PPointCloudRenderer vis_object_ { nullptr };
        uint32_t point_count_ { 0u };

        // methods

        void DrawOnNextUpdate() const;
        void StoreData(const cogs::PointCloud& pc);

## Detailed Documentation

Resource that allows visualization of a cogs::PointCloud structure.

### Construction

    ScanResource(const std::string& name, const cogs::Scan& sc)

Constructor of Scan resource object.

### Methods

    virtual PGadget CreateGadget()

Creates ScanGadget. Function is handled by HIRO, non accessible by user.