struct mrpt::opengl::TLightParameters

Lighting parameters, mostly for triangle shaders.

Refer to standard OpenGL literature and tutorials for the meaning of each field, and to the shader GLSL code itself.

#include <mrpt/opengl/TLightParameters.h>

struct TLightParameters
{
    //
fields

    mrpt::img::TColorf diffuse = {0.8f, 0.8f, 0.8f, 0.0f};
    mrpt::img::TColorf ambient = {0.2f, 0.2f, 0.2f, 1.0f};
    mrpt::img::TColorf specular = {1.0f, 1.0f, 1.0f, 1.0f};
    mrpt::math::TVector3Df direction = {-0.40825f, -0.40825f, -0.81650f};

    //
methods

    void writeToStream(mrpt::serialization::CArchive& out) const;
    void readFromStream(mrpt::serialization::CArchive& in);
};

Fields

mrpt::math::TVector3Df direction = {-0.40825f, -0.40825f, -0.81650f}

Light direction (must be normalized)