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

	Rainbow.h

	Copyright (c)1990 - 1999 MetaCreations. All rights reserved.

	Author: Jerome Bignon

	Date: 04/28/99

	Revision history

	when		who			what & why
	=========== =========== =====================================================================
	29/04/99	Jerome		Creation

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

#ifndef __Rainbow__
#define __Rainbow__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "RainbowDef.h"
#include "BasicShader.h"

// Define the RainbowShader CLSID ( see the RainbowDef.h file to get R_CLSID_Rainbow value )

extern const MCGUID CLSID_Rainbow;


struct RainbowShaderPublicData
{
	int16	fIntensity;				// Intensity of the rainbow
	int32	fModeLocalOrGlobal;		// Mode of the rainbow ( Local or Global )
};

class Rainbow : public TBasicShader
{
public :

	RainbowShaderPublicData	RainbowPublicData;

	Rainbow();

	STANDARD_RELEASE;

//	We don't have to take care of the non implemented methods because the TBasicShader
//	does it for us

	virtual void*			MCCOMAPI    GetExtensionDataBuffer	();
	virtual int32			MCCOMAPI	GetParamsBufferSize		() const	{ return sizeof(RainbowPublicData);}
	virtual boolean			MCCOMAPI    IsEqualTo				(I3DExShader* aShader);  
	virtual MCCOMErr		MCCOMAPI	GetShadingFlags			(ShadingFlags& theFlags);
	virtual EShaderOutput	MCCOMAPI	GetImplementedOutput	();

	virtual real			MCCOMAPI	GetColor				(TMCColorRGBA& result,boolean& fullArea,ShadingIn& shadingIn);

};
                           
#endif // __Rainbow__
