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

		BasicRenderFeature.h

		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		Author:	Ray Dream
		Date:	9/29/98

		Revision History

		when		who					what & why
		==========	================	======================================================
		08/11/99	Guillaume&Christy	Added inheritance to all the Basic* classes

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

#ifndef __BasicRenderFeature__
#define __BasicRenderFeature__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "BasicCOMImplementations.h"
#include "MCBasicTypes.h"
#include "I3DExRenderFeature.h"

/// \addtogroup BaseClass
/// \{

/***********************************************************************\
*                                                                       *
*     TBasicRenderFeature                                               *
*                                                                       *
\***********************************************************************/
/// Basic Render Feature class.
class TBasicRenderFeature : public TBasicDataExchanger 
{
	public:
		
		virtual MCCOMErr MCCOMAPI QueryInterface	(const MCIID &riid, void** ppvObj);
		virtual uint32 	 MCCOMAPI AddRef			() { return TBasicDataExchanger::AddRef(); }
};



/***********************************************************************\
*                                                                       *
*     TBasicShadowFeature                                               *
*                                                                       *
\***********************************************************************/
/// Basic Shadow Feature class.  Derive from this for a default implementation of I3DExShadowFeature
/// \see I3DExShadowFeature
class TBasicShadowFeature : public I3DExShadowFeature, public TBasicRenderFeature  
{
	public:
		virtual MCCOMErr MCCOMAPI QueryInterface		(const MCIID &riid, void** ppvObj);
		virtual uint32 	 MCCOMAPI AddRef				() { return TBasicDataExchanger::AddRef();}

		virtual MCCOMErr MCCOMAPI BeginRenderFrame		(I3DShLightsource *light);
		virtual MCCOMErr MCCOMAPI EndRenderFrame		();
		//virtual MCCOMErr MCCOMAPI GetShadowNeedFlags	(uint32& needFlags);	//optional
		virtual boolean  MCCOMAPI CalcShadow			(ShadowIO& shadowIO,const LightingContext& lightingContext);
};



/***********************************************************************\
*                                                                       *
*     TBasicReflectionFeature                                           *
*                                                                       *
\***********************************************************************/
/// Basic Reflection Feature class.  Derive from this for a default implementation of I3DExReflectionFeature
/// \see I3DExReflectionFeature
class TBasicReflectionFeature : public I3DExReflectionFeature, public TBasicRenderFeature  
{
	public:
		virtual MCCOMErr		MCCOMAPI QueryInterface			(const MCIID &riid, void** ppvObj);
		virtual uint32 			MCCOMAPI AddRef					()	{ return TBasicDataExchanger::AddRef();}

		//virtual MCCOMErr		MCCOMAPI GetReflectionNeedFlags	(uint32& needFlags);	//optional
		virtual MCCOMErr		MCCOMAPI CalcReflection			(ReflectionIO& reflectionIO,const LightingContext& lightingContext);
};



/***********************************************************************\
*                                                                       *
*     TBasicRefractionFeature                                           *
*                                                                       *
\***********************************************************************/
/// Basic RefractionFeature class.  Derive from this for a default implementation of I3DExRefractionFeature
/// \see I3DExRefractionFeature
class TBasicRefractionFeature : public I3DExRefractionFeature, public TBasicRenderFeature  
{
	public:
		virtual MCCOMErr		MCCOMAPI QueryInterface			(const MCIID &riid, void** ppvObj);
		virtual uint32 			MCCOMAPI AddRef					() { return TBasicDataExchanger::AddRef();}

		//virtual MCCOMErr		MCCOMAPI GetRefractionNeedFlags	(uint32& needFlags);	//optional
		virtual MCCOMErr		MCCOMAPI CalcRefraction			(RefractionIO& refractionIO,const LightingContext& lightingContext);
};

/// \}
#endif