/* Universidade Federal Fluminense
 * Programa de Pós-Graduação em Computação
 *
 * Tópicos Avançados em Computação Visual e Interfaces II (Técnicas Avançadas de Rendering)
 * Professor: Leandro Augusto Frata Fernandes
 *
 * Version: 2012.05.05-001
 */

#include "light.h"

AbstractLight::AbstractLight() :
	m_diffuse(1.0f, 1.0f, 1.0f, 1.0f),
	m_specular(1.0f, 1.0f, 1.0f, 1.0f) {
}

AbstractLight::AbstractLight(const color4f& diffuse_, const color4f& specular_) :
	m_diffuse(diffuse_),
	m_specular(specular_) {
}

PointLight::PointLight() {
}

PointLight::PointLight(const color4f& diffuse_, const color4f& specular_) :
	AbstractLight(diffuse_, specular_) {
}

PointLight::PointLight(const coord3f& location_) :
	Object(location_, coord3f(0.0f, 0.0f, 1.0f), coord3f(0.0f, 1.0f, 0.0f)) {
}

PointLight::PointLight(const coord3f& location_, const color4f& diffuse_, const color4f& specular_) :
	AbstractLight(diffuse_, specular_),
	Object(location_, coord3f(0.0f, 0.0f, 1.0f), coord3f(0.0f, 1.0f, 0.0f)) {
}

void PointLight::setPosition(const coord3f& location_) {
	Object::setPosition(location_, coord3f(0.0f, 0.0f, 1.0f), coord3f(0.0f, 1.0f, 0.0f));
}

SpotLight::SpotLight() {
}

SpotLight::SpotLight(const color4f& diffuse_, const color4f& specular_) :
	AbstractLight(diffuse_, specular_) {
}

SpotLight::SpotLight(const coord3f& location_, const coord3f& forwardDirection_, const coord3f& upDirection_, const GLfloat& fovYInRadians_, const GLfloat& aspectRatio_, const GLfloat& zNear_, const GLfloat& zFar_) :
	PinholeCamera(location_, forwardDirection_, upDirection_, fovYInRadians_, aspectRatio_, zNear_, zFar_) {
}

SpotLight::SpotLight(const coord3f& location_, const coord3f& forwardDirection_, const coord3f& upDirection_, const GLfloat& fovYInRadians_, const GLfloat& aspectRatio_, const GLfloat& zNear_, const GLfloat& zFar_, const color4f& diffuse_, const color4f& specular_) :
	AbstractLight(diffuse_, specular_),
	PinholeCamera(location_, forwardDirection_, upDirection_, fovYInRadians_, aspectRatio_, zNear_, zFar_) {
}
