#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.
GLubyte GLubyte GLubyte GLubyte w
The namespace for 3D scene representation and rendering.
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &out, const mrpt::opengl::CLight &o)
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, mrpt::opengl::CLight &o)
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
void writeToStream(mrpt::serialization::CArchive &out) const
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 setPosition(float x, float y, float z, float w)
void readFromStream(mrpt::serialization::CArchive &in)