MRPT  2.0.4
List of all members | Public Member Functions | Public Attributes
mrpt::opengl::TLightParameters Struct Reference

Detailed Description

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.

Definition at line 22 of file TLightParameters.h.

#include <mrpt/opengl/TLightParameters.h>

Public Member Functions

 TLightParameters ()=default
 
 ~TLightParameters ()=default
 
void writeToStream (mrpt::serialization::CArchive &out) const
 
void readFromStream (mrpt::serialization::CArchive &in)
 

Public Attributes

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}
 Light direction (must be normalized) More...
 

Constructor & Destructor Documentation

◆ TLightParameters()

mrpt::opengl::TLightParameters::TLightParameters ( )
default

◆ ~TLightParameters()

mrpt::opengl::TLightParameters::~TLightParameters ( )
default

Member Function Documentation

◆ readFromStream()

void TLightParameters::readFromStream ( mrpt::serialization::CArchive in)

Definition at line 27 of file TLightParameters.cpp.

References MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION.

Referenced by mrpt::opengl::operator>>().

Here is the caller graph for this function:

◆ writeToStream()

void TLightParameters::writeToStream ( mrpt::serialization::CArchive out) const

Definition at line 19 of file TLightParameters.cpp.

References out.

Referenced by mrpt::opengl::operator<<().

Here is the caller graph for this function:

Member Data Documentation

◆ ambient

mrpt::img::TColorf mrpt::opengl::TLightParameters::ambient = {0.2f, 0.2f, 0.2f, 1.0f}

◆ diffuse

mrpt::img::TColorf mrpt::opengl::TLightParameters::diffuse = {0.8f, 0.8f, 0.8f, 0.0f}

◆ direction

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

Light direction (must be normalized)

Definition at line 32 of file TLightParameters.h.

Referenced by mrpt::opengl::CRenderizableShaderTriangles::render().

◆ specular

mrpt::img::TColorf mrpt::opengl::TLightParameters::specular = {1.0f, 1.0f, 1.0f, 1.0f}



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020