#pragma once
#include "Vector3D.h"
#include "Vertex.h"
#include "SharedTools.h"
#include "Model.h"
#include "Polygon3D.h"
#include "windows.h"

class Light
{
public:
	Light();
	Light(int red, int green, int blue);
	Light(const Light& other);

	~Light();

	void SetLightIntensity(int red, int green, int blue);
	void SetLightIntensity(ColRef color, int value);
	void SetRedLightIntensity(int value);
	void SetGreenLightIntensity(int value);
	void SetBlueLightIntensity(int value);

	int GetLightIntensity(ColRef color) const;
	int GetRedLightIntensity() const;
	int GetGreenLightIntensity() const;
	int GetBlueLightIntensity() const;

	bool GetLightActive() const;
	void SetLightActive(bool active);
	void ToggleLightActive();

	virtual COLORREF CalculateLight(const Model& currentModel, const Polygon3D& currentPolygon, COLORREF colorIn) = 0;
	virtual COLORREF CalculateLight(const Model& currentModel, const Vertex& currentVertex, COLORREF colorIn) = 0;

	Light& operator= (const Light& rhs);

protected:	
	int _liRed;
	int _liGreen;
	int _liBlue;

	bool _active;

	void Copy(const Light& other);
};

