18 color.SetRGBA(255,255,255,255);
24 transform->MakeIdentity();
34 transform->MakeIdentity();
38 float newAmbientIntensity,
const VART::Color& newColor,
41 description = newDescription;
42 intensity = newIntensity;
43 ambientIntensity = newAmbientIntensity;
45 location = newLocation;
49 transform->MakeIdentity();
54 intensity = light.intensity;
55 ambientIntensity = light.ambientIntensity;
74 intensity = light.intensity;
75 ambientIntensity = light.ambientIntensity;
100 ambientIntensity = ai;
104 return(ambientIntensity);
124 location = newLocation;
131 float weightedColor[4];
132 GLenum realID = getOpenGLID(oglLightID);
161 color.GetScaled(ambientIntensity, weightedColor);
162 glLightfv(realID, GL_AMBIENT, weightedColor);
163 color.GetScaled(intensity, weightedColor);
164 glLightfv(realID, GL_DIFFUSE, weightedColor);
virtual SceneNode * Copy()
Returns a copy of an Light. Every derived class must reimplements this method, to avoid errors with V...
Base class for objects that compose a scene graph.
void SetColor(const Color &c)
Points and vectors using homogeneous coordinates.
unsigned int getOpenGLID(unsigned int lightID) const
std::string description
Textual identification.
RGBA color representation.
void SetLocation(const Point4D &newLocation)
Sets the location of the light.
Axis aligned bounding box.
Header file for V-ART class "Light".
Light & operator=(const Light &light)
virtual bool RecursiveBoundingBox(BoundingBox *bBox)
Always returns false, therefore recursive bbox does not exist.
void SetIntensity(float i)
void SetAmbientIntensity(float ai)
float GetAmbientIntensity() const
float GetIntensity() const
static const Light & BRIGHT_AMBIENT()
Strong, white ambient light.
void Turn(bool on_off)
Turns a light on or off.
virtual bool DrawOGL() const
Recursive drawing using OpenGL commands.
static const Point4D & ORIGIN()
The (0,0,0,1) point.
static const Color & WHITE()
White opaque color.
static const Light & SUN()
White directional light towards negative Y. Small ambient intensity.
Represents a light source.