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

		I3DShRenderFeature.h

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

		Render Feature shell definitions

		Author:	Ray Dream
		Date:	3/2/98

		Revision History

		when		who			what & why
		==========	==========	======================================================
		6/10/99		Ian			Array API changes.

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

#ifndef __I3DSHRENDERFEATURE__
#define __I3DSHRENDERFEATURE__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "APITypes.h"
#include "MCCompObj.h"


//****** Globally Unique Ids *************************************************

MCDEFINE_GUID_H(IID_I3DShShadowFeature);
MCDEFINE_GUID_H(IID_I3DShReflectionFeature);
MCDEFINE_GUID_H(IID_I3DShRefractionFeature);
MCDEFINE_GUID_H(IID_I3DShDataComponent);

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

template<class T> class TMCArray;
struct IShParameterComponent;
struct I3DImportData;

/// \addtogroup ShellInterface
/// \{

/// see I3DExShadowFeature
///
struct I3DShShadowFeature: public IMCUnknown
{
};

/// see I3DExReflectionFeature
///
struct I3DShReflectionFeature: public IMCUnknown
{
};

/// see I3DExRefractionFeature
///
struct I3DShRefractionFeature: public IMCUnknown
{
};

// ****************************************************************************
//								I3DShDataComponent
// 
/// <P>A data component is a component that is attached to an object (a light, a camera or an primitive...)
/// and is used to store static or animated parameters.</P>
///
/// <P>It call also be used to trigger a post rendering to take place that relies on the data stores
/// in the data component. This also for instance, a post rendering to affect only the objects on which
/// a particular data component is active.</P>
///
/// <P>Last it can be used to associate a volumetric effect with an object. For instance a light cone
/// with a given light or a volumetric aura on a primitive.</P>
///
/// <P>There are two interfaces to access a dataComponent: The shell interface (I3DShDataComponent) and
/// the external interface (I3DExDataComponent) . You can get one from the other using QueryInterface.</P>
///
/// <P>You should use the Shell interface (I3DShDataComponent) to access the component
/// because the Shell will make sure that the parameter map of the external component is valid.
/// This is especially important if the component is animated. For more information on components
/// see the Overview of the SDK.</P>
///
/// \see I3DExDataComponent
///
struct I3DShDataComponent: public IMCUnknown
{
	// ****************************************************************************
	//								GetPostRenderList
	// 
	/// Fills the array with the class ID of the postrenderer that are enabled by this dataComponent
	///
	/// \param idArray	Reference to the array where the ids should added
	///
	virtual MCCOMErr MCCOMAPI GetPostRenderList	(TMCArray<IDType>& idArray)=0;

	// ****************************************************************************
	//								IsActive
	// 
	/// Returns false if the dataComponent has no effect on this object
	///
	/// \param tree  The tree element on which the datacomponent is located.
	/// 
	virtual boolean	 MCCOMAPI IsActive(I3DShTreeElement* tree)=0;

	// ****************************************************************************
	//								GetVolumetricList
	// 
	/// Returns a list of class IDs of the Volumetric components to instantiate to render this effect
	///
	/// \param idArray	Reference to the array where the ids should added
	///
	virtual void MCCOMAPI GetVolumetricList(TMCArray<IDType>& idArray)=0;


	/// Returns the IShParameterComponent interface that is always supported by datacomponents
	virtual IShParameterComponent*	MCCOMAPI GetThisParameterComponent()=0;

	///return true if the component can perform the import operation
	virtual boolean	 MCCOMAPI CanImportData				(I3DImportData*	inImportData) = 0;

	///return true if the component performed the import operation
	virtual boolean	 MCCOMAPI ImportData				(I3DImportData* inImportData) = 0;
};

/// \}

#endif