/*
///////////////////////////////////////////////////////////////////////////////////////////////////
// Description : SpotMod.hpp
//
// Modification classes
//
///////////////////////////////////////////////////////////////////////////////////////////////////
// inherit from CPA_Modif
//
///////////////////////////////////////////////////////////////////////////////////////////////////
// Creation date: 11 feb 1997                        Author: J Thénoz
///////////////////////////////////////////////////////////////////////////////////////////////////
// Modification date:			                      Author:
//
//
//
//
///////////////////////////////////////////////////////////////////////////////////////////////////
*/

#ifndef __SPOTMOD_HPP__
#define __SPOTMOD_HPP__

#define TYPE_CHANGE_RGB		15
#define TYPE_CHANGE_NEARFAR 16
#define TYPE_CHANGE_ALPHA	17
#define TYPE_CHANGE_STATE   18
#define TYPE_CHANGE_INTENSITY 19
//CHINA WFQ (MT) 16/02/98 {
#define TYPE_CHANGE_INTER_MIN 20
#define TYPE_CHANGE_INTER_MAX 21
#define TYPE_CHANGE_EXTER_MIN 22
#define TYPE_CHANGE_EXTER_MAX 23
#define TYPE_CHANGE_INTENSITY_MIN_MAX 24
//ENDCHINA WFQ }

class Light;

class ModifLightRGB : public CPA_Modif
{
protected:
	Light* m_poLight;
	GEO_tdstColor	m_stColor;
	GEO_tdstColor	m_stOldColor;
	BOOL			m_bRedo;

public :
	ModifLightRGB (Light* poLight, GEO_tdstColor& stColor, BOOL pBlock=0);
	void fn_vSetLightRGB ( GEO_tdstColor& stColor );
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);
};

class ModifLightIntensity : public CPA_Modif
{
	Light*	m_poLight;
	float	m_fIntensity;
	float	m_fOldIntensity;
	GEO_tdstColor	m_stColor;
	BOOL	m_bRedo;

public:
	ModifLightIntensity (Light* poLight, float& fIntensity, BOOL pBlock=0);
	void fn_vSetLightIntensity (float& fIntensity);
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);

protected:
	void fn_vChangeIntensity (float& fIntensity);
};

class ModifLightNearFar : public CPA_Modif
{
protected:
	Light* m_poLight;
	MTH_tdxReal m_stNearValue;
	MTH_tdxReal m_stFarValue;
	MTH_tdxReal m_stOldNearValue;
	MTH_tdxReal m_stOldFarValue;
	BOOL		m_bRedo;

public :
	ModifLightNearFar (Light* poLight, MTH_tdxReal& xNearValue, MTH_tdxReal& xFarValue, BOOL pBlock=0);
	void fn_vSetLightNearFar ( MTH_tdxReal& xNearValue, MTH_tdxReal& xFarValue );
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);
};

class ModifLightAlpha : public CPA_Modif
{
protected:
	Light* m_poLight;
	MTH_tdxReal m_stBigAlpha;
	MTH_tdxReal m_stLittleAlpha;
	MTH_tdxReal m_stOldBigAlpha;
	MTH_tdxReal m_stOldLittleAlpha;
	BOOL		m_bRedo;


public :
	ModifLightAlpha (Light* poLight, MTH_tdxReal& xLittleAplha, MTH_tdxReal& xBigAlpha, BOOL pBlock=0);
	void fn_vSetLightAlpha ( MTH_tdxReal& xLittleAplha, MTH_tdxReal& xBigAlpha );
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);
};

class ModifLightOnOff : public CPA_Modif
{
protected:
	Light*	m_poLight;
	BOOL	m_bState;
	BOOL	m_bRedo;


public :
	ModifLightOnOff (Light* poLight, BOOL bState, BOOL pBlock=0);
	void fn_vSetLightOnOff ( BOOL bState );
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);
};

//CHINA WFQ (MT) 16/02/98 {
class ModifLight_Intensity_Min_Max : public CPA_Modif
{
protected:
	Light* m_poLight;
	MTH_tdxReal m_stIntensity_Min;
	MTH_tdxReal m_stIntensity_Max;
	MTH_tdxReal m_stOldIntensity_Min;
	MTH_tdxReal m_stOldIntensity_Max;

public :
	ModifLight_Intensity_Min_Max (Light* poLight, MTH_tdxReal& xIntensity_Min, MTH_tdxReal& xIntensity_Max, BOOL pBlock=0);
	void fn_vSetLight_Intensity_Min_Max ( MTH_tdxReal& xIntensity_Min, MTH_tdxReal& xIntensity_Max );
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);
};

class ModifLight_Inter_Min_Pos : public CPA_Modif
{
protected:
	Light* m_poLight;
	MTH3D_tdstVector m_stInter_Min_Pos;
	MTH3D_tdstVector m_stOldInter_Min_Pos;
public :
	ModifLight_Inter_Min_Pos (Light* poLight, MTH3D_tdstVector xInter_Min_Pos, BOOL pBlock=0);
	void fn_vSetLight_Inter_Min_Pos ( MTH3D_tdstVector xInter_Min_Pos );
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);
};

class ModifLight_Inter_Max_Pos : public CPA_Modif
{
protected:
	Light* m_poLight;
	MTH3D_tdstVector m_stInter_Max_Pos;
	MTH3D_tdstVector m_stOldInter_Max_Pos;
public :
	ModifLight_Inter_Max_Pos (Light* poLight, MTH3D_tdstVector xInter_Max_Pos, BOOL pBlock=0);
	void fn_vSetLight_Inter_Max_Pos ( MTH3D_tdstVector xInter_Max_Pos );
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);
};

class ModifLight_Exter_Min_Pos : public CPA_Modif
{
protected:
	Light* m_poLight;
	MTH3D_tdstVector m_stExter_Min_Pos;
	MTH3D_tdstVector m_stOldExter_Min_Pos;
public :
	ModifLight_Exter_Min_Pos (Light* poLight, MTH3D_tdstVector xExter_Min_Pos, BOOL pBlock=0);
	void fn_vSetLight_Exter_Min_Pos ( MTH3D_tdstVector xExter_Min_Pos );
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);
};

class ModifLight_Exter_Max_Pos : public CPA_Modif
{
protected:
	Light* m_poLight;
	MTH3D_tdstVector m_stExter_Max_Pos;
	MTH3D_tdstVector m_stOldExter_Max_Pos;
public :
	ModifLight_Exter_Max_Pos (Light* poLight, MTH3D_tdstVector xExter_Max_Pos, BOOL pBlock=0);
	void fn_vSetLight_Exter_Max_Pos ( MTH3D_tdstVector xExter_Max_Pos );
	Light* fn_pGetLight (void) { return m_poLight; }
	BOOL Do (void);
	BOOL Undo (void);
};
//ENDCHINA WFQ }

#endif
