float direction[3]
[x,y,z]
float constant_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 DECLARE_TTYPENAME_CLASSNAME(_CLASSNAME)
Like DECLARE_CUSTOM_TTYPENAME(), but for use within the class declaration body.
Virtual base class for "archives": classes abstracting I/O streams.
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)
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)