/*********************************************************************

Name:		Raytracer
Author:		Kamil Szatkowski "Netrix" (C)
Website:	http://www.netrix.org.pl/

*********************************************************************/
#pragma once
#include "NLib/nMath.hpp"
#include "NLib/nDynamicTable.hpp"

// Struct which is being returened to raytracer
struct LightInfo
{
	NIne::NMVector3f v3Position;
	NIne::NMVector3f v3Color;
	float fPower;
};

/* No groups, all lights taken */

class Lights
{
public:
	Lights();

	bool loadLights(const char* szFile);
	void releaseLights();

	void applyDomainFactor(float fDomainFactor);

	NIne::NSize_t getLightCount() const { return m_aLights.GetSize(); }
	const LightInfo& getLightInfo(NIne::NSize_t uLight) const { return m_aLights[uLight]; }

	operator bool() { return m_bLoaded; }

private:
	bool m_bLoaded;

	NIne::NDynamicTable<LightInfo> m_aLights;
};