INFO804 Introduction à l'informatique graphique
|
#include <PointLight.h>
Public Member Functions | |
PointLight (GLenum light_number, Point4 pos, Color emission_color, Color ambient_color=Color(0.0, 0.0, 0.0), Color diffuse_color=Color(1.0, 1.0, 1.0), Color specular_color=Color(1.0, 1.0, 1.0)) | |
~PointLight () | |
Destructor. | |
void | init (Viewer &viewer) |
void | light (Viewer &) |
void | draw (Viewer &viewer) |
Vector3 | direction (const Vector3 &p) const |
Given the point p, returns the normalized direction to this light. | |
Color | color (const Vector3 &) const |
Public Member Functions inherited from rt::Light | |
Light () | |
Default constructor. Nothing to do. | |
virtual | ~Light () |
Virtual destructor since object contains virtual methods. | |
Public Attributes | |
GLenum | number |
Specifies which OpenGL light it is (necessary for draw()) | |
Point4 | position |
The position of the light in homogeneous coordinates. | |
Color | emission |
The emission color of the light. | |
Material | material |
The material (global to the light). | |
qglviewer::ManipulatedFrame * | manipulator |
Used to store a manipulator to move the light in space. | |
This structure defines a point light, which may be at an infinite distance. Such light does not suffer from any attenuation. One can also draw it in order to be displayed and manipulated.
Definition at line 19 of file PointLight.h.
|
inline |
Constructor. light_number must be different for every light (GL_LIGHT0, GL_LIGHT1, etc).
Definition at line 33 of file PointLight.h.
|
inline |
Destructor.
Definition at line 45 of file PointLight.h.
Implements rt::Light.
Definition at line 110 of file PointLight.h.
Given the point p, returns the normalized direction to this light.
Implements rt::Light.
Definition at line 100 of file PointLight.h.
|
inlinevirtual |
This method is called by Scene::draw() at each frame to redisplay objects in the OpenGL window.
Implements rt::Light.
Definition at line 91 of file PointLight.h.
|
inlinevirtual |
This method is called by Scene::init() at the beginning of the display in the OpenGL window.
Implements rt::Light.
Definition at line 52 of file PointLight.h.
|
inlinevirtual |
This method is called by Scene::light() at each frame to set the lights in the OpenGL window.
Implements rt::Light.
Definition at line 74 of file PointLight.h.
Color rt::PointLight::emission |
The emission color of the light.
Definition at line 25 of file PointLight.h.
qglviewer::ManipulatedFrame* rt::PointLight::manipulator |
Used to store a manipulator to move the light in space.
Definition at line 29 of file PointLight.h.
Material rt::PointLight::material |
The material (global to the light).
Definition at line 27 of file PointLight.h.
GLenum rt::PointLight::number |
Specifies which OpenGL light it is (necessary for draw())
Definition at line 21 of file PointLight.h.
Point4 rt::PointLight::position |
The position of the light in homogeneous coordinates.
Definition at line 23 of file PointLight.h.