26 constant_attenuation(1.f),
27 linear_attenuation(0.f),
28 quadratic_attenuation(0.f),
90 #if MRPT_HAS_OPENGL_GLUT
float direction[3]
[x,y,z]
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
mrpt::utils::CStream & operator<<(mrpt::utils::CStream &out, const mrpt::opengl::CLight &o)
float constant_attenuation
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define GL_LINEAR_ATTENUATION
CLight()
Default constructor, sets default values.
void writeToStream(mrpt::utils::CStream &out) const
void sendToOpenGL() const
Define the light in the current OpenGL rendering context (users normally don't need to call this expl...
GLubyte GLubyte GLubyte GLubyte w
Each of the possible lights of a 3D scene.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
This base provides a set of functions for maths stuff.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
GLAPI void GLAPIENTRY glLightf(GLenum light, GLenum pname, GLfloat param)
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.
GLAPI void GLAPIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params)
The namespace for 3D scene representation and rendering.
uint8_t light_ID
OpenGL ID (typical range: 0-7)
void readFromStream(mrpt::utils::CStream &in)
#define GL_CONSTANT_ATTENUATION
float quadratic_attenuation
void setPosition(float x, float y, float z, float w)
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)
#define GL_SPOT_DIRECTION
#define GL_QUADRATIC_ATTENUATION