24 constant_attenuation(1.f),
25 linear_attenuation(0.f),
26 quadratic_attenuation(0.f),
88 #if MRPT_HAS_OPENGL_GLUT
float direction[3]
[x,y,z]
float constant_attenuation
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define GL_LINEAR_ATTENUATION
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &out, const mrpt::opengl::CLight &o)
CLight()
Default constructor, sets default values.
void readFromStream(mrpt::serialization::CArchive &in)
void sendToOpenGL() const
Define the light in the current OpenGL rendering context (users normally don't need to call this expl...
void writeToStream(mrpt::serialization::CArchive &out) const
GLubyte GLubyte GLubyte GLubyte w
Each of the possible lights of a 3D scene.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
GLAPI void GLAPIENTRY glLightf(GLenum light, GLenum pname, GLfloat param)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
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)
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, mrpt::opengl::CLight &o)
#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