5 #include "vmmlib/vector.hpp"
29 Light(
const vmml::Vector3f &position,
const vmml::Vector3f &color)
40 Light(
const vmml::Vector3f &position,
const vmml::Vector3f &color, GLfloat intensity, GLfloat attenuation, GLfloat radius)
41 :
Light(position, color, color, intensity, attenuation, radius)
52 Light(
const vmml::Vector3f &position,
const vmml::Vector3f &diffuseColor,
const vmml::Vector3f &specularColor, GLfloat intensity, GLfloat attenuation, GLfloat radius)
53 : _position(vmml::Vector4f(position, 1.0)), _diffuseColor(diffuseColor), _specularColor(specularColor), _intensity(intensity), _attenuation(attenuation), _radius(radius)
63 void setPosition(
const vmml::Vector3f &position) { _position = vmml::Vector4f(position, 1.0); }
88 void setRadius(GLfloat radius) { _radius = radius; }
118 vmml::Vector4f _position;
119 vmml::Vector3f _diffuseColor;
120 vmml::Vector3f _specularColor;
122 GLfloat _attenuation;
void setPosition(const vmml::Vector3f &position)
Sets the position of the light.
Definition: Light.h:63
GLfloat DEFAULT_LIGHT_RADIUS()
Definition: Configuration.cpp:137
Light(const vmml::Vector3f &position, const vmml::Vector3f &diffuseColor, const vmml::Vector3f &specularColor, GLfloat intensity, GLfloat attenuation, GLfloat radius)
Constructor.
Definition: Light.h:52
Definition: Configuration.h:8
const vmml::Vector3f & getDiffuseColor()
Returns the color of the light for diffuse lighting.
Definition: Light.h:96
A simple point light source.
Definition: Light.h:13
virtual ~Light()
Virtual destructor.
Definition: Light.h:58
const vmml::Vector3f & getSpecularColor()
Returns the color of the light for specular lighting.
Definition: Light.h:100
Light(const vmml::Vector3f &position, const vmml::Vector3f &color)
Constructor loading standard values for intensity and attenuation.
Definition: Light.h:29
Light(const vmml::Vector3f &position, const vmml::Vector3f &color, GLfloat intensity, GLfloat attenuation, GLfloat radius)
Constructor.
Definition: Light.h:40
void setRadius(GLfloat radius)
Sets the radius of the light.
Definition: Light.h:88
GLfloat getRadius()
Returns the radius of the light.
Definition: Light.h:112
GLfloat getIntensity()
Returns the intensity of the light.
Definition: Light.h:104
vmml::Vector4f DEFAULT_LIGHT_POSITION()
Definition: Configuration.cpp:124
void setAttenuation(GLfloat attenuation)
Sets the attenuation of the light.
Definition: Light.h:83
void setDiffuseColor(const vmml::Vector3f &color)
Sets the color of the light for diffuse lighting.
Definition: Light.h:68
void setIntensity(GLfloat intensity)
Sets the intensity of the light.
Definition: Light.h:78
GLfloat DEFAULT_LIGHT_ATTENUATION()
Definition: Configuration.cpp:136
Light()
Constructor loading standard values for position, color, intensity and attenuation.
Definition: Light.h:21
GLfloat getAttenuation()
Returns the attenuation of the light.
Definition: Light.h:108
const vmml::Vector4f & getPosition()
Returns the position of the light.
Definition: Light.h:92
vmml::Vector3f DEFAULT_LIGHT_COLOR()
Definition: Configuration.cpp:128
std::shared_ptr< Light > LightPtr
Definition: Light.h:127
void setSpecularColor(const vmml::Vector3f &color)
Sets the color of the light for specular lighting.
Definition: Light.h:73
GLfloat DEFAULT_LIGHT_INTENSITY()
Definition: Configuration.cpp:135