//	Darkstar Engine  (c) UnderWorld Interactive Studio (all coding by Svarog    2007-2008)
//
//      Данный файл является частью Darkstar Engine. Любое использование кода файла
//      без согласия компании, является нарушением закона об авторском праве (в слу-
//      чае если не оговорено обратное).
//
//      Имя файла: directional_light.inl
//      Краткое описание: directional light
//

namespace gs
{
	inline DirectionalLight::DirectionalLight()
	{
		light_state = DRSL_OFF;
		diffuse_color = specular_color = math::Vect3(1, 1, 1);
		ambient_color = math::Vect3(0, 0, 0);
		direction = math::Vect3(0, 0, 0);

	};

	inline DirectionalLight::DirectionalLight(const DRSLIGHTSTATE& light_state, 
		const math::Vect3& direction, const math::Vect3& diffuse_color, 
		const math::Vect3& specular_color, const math::Vect3& ambient_color)
	{
		this->diffuse_color = diffuse_color;
		this->direction = direction;
		this->ambient_color = ambient_color;
		this->specular_color = specular_color;
		this->light_state = light_state;
		this->light_state = light_state;
	};

	inline DirectionalLight::~DirectionalLight()
	{

	};

	inline const DRSLIGHTSTATE& DirectionalLight::getLightState() const
	{
		return light_state;
	};

	inline void DirectionalLight::setLightState(const DRSLIGHTSTATE& new_light_state)
	{
		light_state = new_light_state;
	};

	inline void DirectionalLight::toggleLightState()
	{
		light_state = static_cast<DRSLIGHTSTATE>(1-static_cast<int>(light_state));
	};

	inline const math::Vect3& DirectionalLight::getAmbientColor() const
	{
		return ambient_color;
	};

	inline void DirectionalLight::setAmbientColor(const math::Vect3& new_color)
	{
		ambient_color = new_color;
	};

	inline const math::Vect3& DirectionalLight::getDiffuseColor() const
	{
		return diffuse_color;
	};

	inline void DirectionalLight::setDiffuseColor(const math::Vect3& new_color)
	{
		diffuse_color = new_color;
	};

	inline const math::Vect3& DirectionalLight::getSpecularColor() const
	{
		return specular_color;
	};

	inline void DirectionalLight::setSpecularColor(const math::Vect3& new_color)
	{
		specular_color = new_color;
	};

	inline const math::Vect3& DirectionalLight::getDirection() const
	{
		return direction;
	};

	inline void DirectionalLight::setDirection(const math::Vect3& new_direction)
	{
		direction = new_direction;
	};
};