#ifndef __SCALEDPPEFFECT__
#define __SCALEDPPEFFECT__


// Forward declarations
class PPEffectsCommon;
class EffectParam;


//------------------------------------------------------------------------------------------
// PostProcFXChain manage a list of scaled effects
//------------------------------------------------------------------------------------------
class ScaledPPEffect
{
	private:

		PPEffectsCommon * m_pEffect;	// A pointer to a standard (our standard) post process effect
		D3DXVECTOR2 m_vScaler;			// X&Y scaler for effects to combine an up/down scaling simultaneously with the effect rendering

		FLOAT ** m_vParamValues;		// The scaled effect user-modifables parameters


	public:

		// Construction / Destruction
		ScaledPPEffect(){ m_pEffect=NULL; m_vParamValues=NULL; }
		ScaledPPEffect(PPEffectsCommon * pEffect, const float fScaleX, const float fScaleY);
		ScaledPPEffect(const ScaledPPEffect * pSrcScaledEffect);
		~ScaledPPEffect();

		//Getters
		PPEffectsCommon * GetEffect(){ return m_pEffect; }
		D3DXVECTOR2 GetScaler(){ return m_vScaler; }
		FLOAT * GetParamValues(const int nIndex){ return (!m_vParamValues)?NULL:m_vParamValues[nIndex]; }

		// Setters
		void SetEffect(PPEffectsCommon * pEffect){ m_pEffect = pEffect; }
		void SetScalerX(const float fScaleX){ m_vScaler.x = fScaleX; }
		void SetScalerY(const float fScaleY){ m_vScaler.y = fScaleY; }
		void SetParamValues(FLOAT * vParamValues, const int nIndex,  const int nSize){ if(!vParamValues || !m_vParamValues) return; memcpy(m_vParamValues[nIndex], vParamValues, nSize*sizeof(FLOAT)); }

		// Override the = operator (in case we try to setup an instance with bigger one)
		ScaledPPEffect& operator = (const ScaledPPEffect& SrcScaledEffect);
};

#endif