20 constantAttenuation = constant;
21 linearAttenuation = linear;
22 quadraticAttenuation = quadratic;
27 GLenum realID = (GLenum) getOpenGLID(oglLightID);
30 pos[0] = location.GetX();
31 pos[1] = location.GetY();
32 pos[2] = location.GetZ();
33 pos[3] = location.GetW();
35 glLightfv(realID, GL_POSITION, pos);
36 glLightf(realID, GL_CONSTANT_ATTENUATION, constantAttenuation);
37 glLightf(realID, GL_LINEAR_ATTENUATION, linearAttenuation);
38 glLightf(realID, GL_QUADRATIC_ATTENUATION, quadraticAttenuation);
Points and vectors using homogeneous coordinates.
void SetAttenuation(float constant=1.0, float linear=0.0, float quadratic=0.0)
Sets the three attenuation factors, described on OpenGL Red Book, Chapter 5: Lighting, section Creating Light Sources.
Header file for V-ART class "PointLight".
virtual bool DrawOGL() const
Recursive drawing using OpenGL commands.
void SetLocation(const Point4D &newLocation)