Each of the possible lights of a 3D scene.
#include <mrpt/opengl/CLight.h>
Public Member Functions | |
CLight () | |
Default constructor, sets default values. More... | |
void | setPosition (float x, float y, float z, float w) |
void | setDirection (float dx, float dy, float dz) |
void | writeToStream (mrpt::utils::CStream &out) const |
void | readFromStream (mrpt::utils::CStream &in) |
void | sendToOpenGL () const |
Define the light in the current OpenGL rendering context (users normally don't need to call this explicitly, it's done from within a. More... | |
Public Attributes | |
uint8_t | light_ID |
OpenGL ID (typical range: 0-7) More... | |
float | color_ambient [4] |
float | color_diffuse [4] |
float | color_specular [4] |
float | position [4] |
[x,y,z,w]: w=0 means directional light, w=1 means a light at a real 3D position. More... | |
float | direction [3] |
[x,y,z] More... | |
float | constant_attenuation |
float | linear_attenuation |
float | quadratic_attenuation |
float | spot_exponent |
float | spot_cutoff |
mrpt::opengl::CLight::CLight | ( | ) |
Default constructor, sets default values.
void mrpt::opengl::CLight::readFromStream | ( | mrpt::utils::CStream & | in | ) |
void mrpt::opengl::CLight::sendToOpenGL | ( | ) | const |
Define the light in the current OpenGL rendering context (users normally don't need to call this explicitly, it's done from within a.
void mrpt::opengl::CLight::setDirection | ( | float | dx, |
float | dy, | ||
float | dz | ||
) |
void mrpt::opengl::CLight::setPosition | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) |
void mrpt::opengl::CLight::writeToStream | ( | mrpt::utils::CStream & | out | ) | const |
uint8_t mrpt::opengl::CLight::light_ID |
float mrpt::opengl::CLight::position[4] |
Page generated by Doxygen 1.9.1 for MRPT 1.4.0 SVN: at Sat Jan 30 21:34:41 UTC 2021 |