#pragma once
#define MLR_MLRCENTERPOINTLIGHT_HPP

#include "MLR.hpp"
#include "MLRPointLight.hpp"

namespace MidLevelRenderer {


	//##########################################################################
	//###################    MLRCenterPointLight    ############################
	//##########################################################################

	class MLRCenterPointLight:
		public MLRInfiniteLightWithFalloff
	{
	public:
		static void
			InitializeClass();
		static void
			TerminateClass();

		MLRCenterPointLight();
		MLRCenterPointLight(
			Stuff::MemoryStream *stream,
			int version
		);
		MLRCenterPointLight(Stuff::Page *page);
		~MLRCenterPointLight();

		void
			Save(Stuff::MemoryStream *stream);
		void
			Write(Stuff::Page *page);

		virtual void
			LightVertex(const MLRVertexData&);
		virtual void
			LightCenter(RGBAColor&);

		virtual LightType
			GetLightType() 
				{ Check_Object(this); return CenterPointLight; }

		virtual MLRLightMap *
			GetLightMap()
				{Check_Object(this); return NULL; }

		virtual
			void SetLightToShapeMatrix(const Stuff::LinearMatrix4D&);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Class Data Support
	//
	public:
		static ClassData
			*DefaultData;

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Testing
	//
	public:
		void
			TestInstance();

	protected:
		Stuff::Scalar
			falloff;
	};

}
