template class mrpt::opengl::OpenGLDepth2LinearLUTs

Overview

Creates look-up-tables (LUTs) to map raw OpenGL depth values in the range [-1,1] to real, linear, depth values.

See also:

CFBORender

#include <mrpt/opengl/OpenGLDepth2LinearLUTs.h>

template <int DEPTH_LUT_NUM_BITS = 18>
class OpenGLDepth2LinearLUTs
{
public:
    // typedefs

    typedef std::vector<float> lut_t;

    // structs

    struct MyHash;

    // fields

    static constexpr static std::size_t NUM_ENTRIES = 1<<DEPTH_LUT_NUM_BITS;

    // methods

    static OpenGLDepth2LinearLUTs& Instance();

    lut_t& lut_from_zn_zf(
        float zn,
        float zf
        );
};