V-ART
pointlight.h
Go to the documentation of this file.
1 
5 #ifndef VART_POINTLIGHT_H
6 #define VART_POINTLIGHT_H
7 
8 #include "vart/light.h"
9 
10 namespace VART {
14  class PointLight : public Light {
15  private:
16  //Point4D location;
17  float constantAttenuation;
18  float linearAttenuation;
19  float quadraticAttenuation;
20 
21  public:
22  PointLight();
23  PointLight(Point4D loc, float constantAtt=1.0, float linearAtt=0.0, float quadraticAtt=0.0);
24 
30  void SetAttenuation(float constant=1.0, float linear=0.0, float quadratic=0.0);
31 
32  float GetConstantAttenuation() const {return constantAttenuation;}
33  float GetLinearAttenuation() const { return linearAttenuation; }
34  float GetQuadraticAttenuation() const { return quadraticAttenuation; }
35 
39  virtual bool DrawOGL(unsigned int oglLightID) const;
40 
41  void SetLocation(const Point4D& newLocation) { location = newLocation; }
42  Point4D GetLocation() const { return location; }
43 
44  }; // end class declaration
45 } // end namespace
46 #endif
Point light source.
Definition: pointlight.h:14
Point4D location
Definition: light.h:87
float GetLinearAttenuation() const
Definition: pointlight.h:33
Points and vectors using homogeneous coordinates.
Definition: point4d.h:22
Header file for V-ART class "Light".
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.
Definition: pointlight.cpp:19
float GetConstantAttenuation() const
Definition: pointlight.h:32
Point4D GetLocation() const
Definition: pointlight.h:42
float GetQuadraticAttenuation() const
Definition: pointlight.h:34
virtual bool DrawOGL() const
Recursive drawing using OpenGL commands.
Definition: scenenode.cpp:76
void SetLocation(const Point4D &newLocation)
Definition: pointlight.h:41
Represents a light source.
Definition: light.h:22