template class mrpt::opengl::PointCloudAdapter<mrpt::opengl::CPointCloudColoured>

Overview

Specialization mrpt::opengl::PointCloudAdapter<mrpt::opengl::CPointCloudColoured> mrpt_adapters_grp.

#include <mrpt/opengl/CPointCloudColoured.h>

template <>
class PointCloudAdapter<mrpt::opengl::CPointCloudColoured>
{
public:
    // typedefs

    typedef float coords_t;

    // fields

    static constexpr bool HAS_RGB = true;
    static constexpr bool HAS_RGBf = true;
    static constexpr bool HAS_RGBu8 = false;

    // construction

    PointCloudAdapter(const mrpt::opengl::CPointCloudColoured& obj);

    // methods

    size_t size() const;
    void resize(size_t N);
    void setDimensions(size_t height, size_t width);

    template <typename T>
    void getPointXYZ(size_t idx, T& x, T& y, T& z) const;

    void setPointXYZ(size_t idx, const coords_t x, const coords_t y, const coords_t z);
    void setInvalidPoint(size_t idx);

    template <typename T>
    void getPointXYZ_RGBAf(
        size_t idx,
        T& x,
        T& y,
        T& z,
        float& Rf,
        float& Gf,
        float& Bf,
        float& Af
        ) const;

    void setPointXYZ_RGBAf(
        size_t idx,
        const coords_t x,
        const coords_t y,
        const coords_t z,
        const float Rf,
        const float Gf,
        const float Bf,
        const float Af
        );

    template <typename T>
    void getPointXYZ_RGBu8(
        size_t idx,
        T& x,
        T& y,
        T& z,
        uint8_t& r,
        uint8_t& g,
        uint8_t& b
        ) const;

    void setPointXYZ_RGBu8(
        size_t idx,
        const coords_t x,
        const coords_t y,
        const coords_t z,
        const uint8_t r,
        const uint8_t g,
        const uint8_t b,
        const uint8_t a = 0xff
        );

    void getPointRGBf(size_t idx, float& r, float& g, float& b) const;
    void setPointRGBf(size_t idx, const float r, const float g, const float b);
    void getPointRGBu8(size_t idx, uint8_t& r, uint8_t& g, uint8_t& b) const;
    void setPointRGBu8(size_t idx, const uint8_t r, const uint8_t g, const uint8_t b);
};

Typedefs

typedef float coords_t

The type of each point XYZ coordinates.

Fields

static constexpr bool HAS_RGB = true

Has any color RGB info?

static constexpr bool HAS_RGBf = true

Has native RGB info (as floats)?

static constexpr bool HAS_RGBu8 = false

Has native RGB info (as uint8_t)?

Construction

PointCloudAdapter(const mrpt::opengl::CPointCloudColoured& obj)

Constructor (accept a const ref for convenience)

Methods

size_t size() const

Get number of points.

void resize(size_t N)

Set number of points (to uninitialized values)

void setDimensions(size_t height, size_t width)

Does nothing as of now.

template <typename T>
void getPointXYZ(size_t idx, T& x, T& y, T& z) const

Get XYZ coordinates of i’th point.

void setPointXYZ(size_t idx, const coords_t x, const coords_t y, const coords_t z)

Set XYZ coordinates of i’th point.

template <typename T>
void getPointXYZ_RGBAf(
    size_t idx,
    T& x,
    T& y,
    T& z,
    float& Rf,
    float& Gf,
    float& Bf,
    float& Af
    ) const

Get XYZ_RGBf coordinates of i’th point.

void setPointXYZ_RGBAf(
    size_t idx,
    const coords_t x,
    const coords_t y,
    const coords_t z,
    const float Rf,
    const float Gf,
    const float Bf,
    const float Af
    )

Set XYZ_RGBf coordinates of i’th point.

template <typename T>
void getPointXYZ_RGBu8(
    size_t idx,
    T& x,
    T& y,
    T& z,
    uint8_t& r,
    uint8_t& g,
    uint8_t& b
    ) const

Get XYZ_RGBu8 coordinates of i’th point.

void setPointXYZ_RGBu8(
    size_t idx,
    const coords_t x,
    const coords_t y,
    const coords_t z,
    const uint8_t r,
    const uint8_t g,
    const uint8_t b,
    const uint8_t a = 0xff
    )

Set XYZ_RGBu8 coordinates of i’th point.

void getPointRGBf(size_t idx, float& r, float& g, float& b) const

Get RGBf color of i’th point.

void setPointRGBf(size_t idx, const float r, const float g, const float b)

Set XYZ_RGBf coordinates of i’th point.

void getPointRGBu8(size_t idx, uint8_t& r, uint8_t& g, uint8_t& b) const

Get RGBu8 color of i’th point.

void setPointRGBu8(
    size_t idx,
    const uint8_t r,
    const uint8_t g,
    const uint8_t b
    )

Set RGBu8 coordinates of i’th point.