10 #ifndef opengl_CLight_H
11 #define opengl_CLight_H
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
GLubyte GLubyte GLubyte GLubyte w
GLsizei const GLchar ** string
mrpt::utils::CStream & operator<<(mrpt::utils::CStream &out, const mrpt::opengl::CLight &o)
mrpt::utils::CStream & operator>>(mrpt::utils::CStream &in, mrpt::opengl::CLight &o)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Each of the possible lights of a 3D scene.
uint8_t light_ID
OpenGL ID (typical range: 0-7)
float direction[3]
[x,y,z]
float position[4]
[x,y,z,w]: w=0 means directional light, w=1 means a light at a real 3D position.
void setDirection(float dx, float dy, float dz)
float quadratic_attenuation
float constant_attenuation
CLight()
Default constructor, sets default values.
void sendToOpenGL() const
Define the light in the current OpenGL rendering context (users normally don't need to call this expl...
void readFromStream(mrpt::utils::CStream &in)
void writeToStream(mrpt::utils::CStream &out) const
void setPosition(float x, float y, float z, float w)
A template to obtain the type of its argument as a string at compile time.