26 constant_attenuation(1.f),
27 linear_attenuation(0.f),
28 quadratic_attenuation(0.f),
89 #if MRPT_HAS_OPENGL_GLUT
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define GL_QUADRATIC_ATTENUATION
GLAPI void GLAPIENTRY glLightf(GLenum light, GLenum pname, GLfloat param)
#define GL_LINEAR_ATTENUATION
#define GL_SPOT_DIRECTION
GLAPI void GLAPIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params)
#define GL_CONSTANT_ATTENUATION
GLubyte GLubyte GLubyte GLubyte w
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This base provides a set of functions for maths stuff.
The namespace for 3D scene representation and rendering.
OPENGL_IMPEXP mrpt::utils::CStream & operator<<(mrpt::utils::CStream &out, const mrpt::opengl::CLight &o)
::mrpt::utils::CStream & operator>>(mrpt::utils::CStream &in, CAngularObservationMeshPtr &pObj)
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values,...
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)