#include "light_point.h"

namespace CBK
{
	namespace Lights
	{
		Point::Point(IDirect3DDevice9* device) : Light(device)
		{
			setType(D3DLIGHT_POINT);
		}

		Point::~Point(void)
		{
		}

		Point& Point::setAttenuation(const float& constant, const float& linear, const float& quadratic)
		{
			light.Attenuation0 = constant;
			light.Attenuation1 = linear;
			light.Attenuation2 = quadratic;

			return *this;
		}

		Point& Point::setFalloff(const float& falloff)
		{
			light.Falloff = falloff;

			return *this;
		}

		Point& Point::setPosition(const D3DVECTOR& position)
		{
			light.Position = position;

			return *this;
		}
	}
}