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

		I3DExShaderTransform.h
		Copyright: (c) 2004 Eovia Corp. All rights reserved.

		Author:	Jeremy
		Date:	6/7/2004

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

#ifndef __I3DExShaderTransform__
#define __I3DExShaderTransform__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "IExtension.h"
#include "APITypes.h"
#include "ShaderTypes.h"


class TTreeTransform;


//****** Globally Unique Ids *************************************************
MCDEFINE_GUID2(IID_I3DExShaderTransform, R_IID_I3DExShaderTransform);

/// \addtogroup ExternalInterface
/// \{

/// This is the interface for the shader transforms.
///
struct I3DExShaderTransform : public IMCUnknown
{
	// ****************************************************************************
	//								TransformShading
	// 
	/// TransformShading applies the shading transform
	///				 by transforming the hit location and normals (and their derivatives)
	///				 in local coordinates.
	///
	/// \param shadingIn	The original shading data
	///	\param result		The new transformed data
	///
	virtual void	MCCOMAPI	TransformShading(ShadingIn& result, const ShadingIn& shadingIn) =0;

	// ****************************************************************************
	//								IsEnabled
	// 
	/// Returns true if the shading transform is set to enabled.
	///
	virtual boolean	MCCOMAPI	IsEnabled() =0;

	// ****************************************************************************
	//								SetEnabled
	// 
	/// Sets the enabled status of the transform.
	///
	virtual void	MCCOMAPI	SetEnabled(boolean enabled) =0; 
	
	// ****************************************************************************
	//								SetTransform
	// 
	/// Sets the transform for the shader.
	///
	/// \param	transform		A TTreeTransform from whose data the ShaderTransform
	///							parameters will be set.
	/// \param	uniformScale	An extra uniform scaling.
	///
	/// \return	 Nothing
	///
	virtual void	MCCOMAPI	SetTransform(const TTreeTransform& transform, const real32 uniformScale = 1.0f) =0;

	// ****************************************************************************
	//								InverseTransformNormal
	// 
	/// Applies the inverse of the transform to the given normal
	///
	/// \param normal	The normal to be inverse transformed.
	///
	virtual void	 MCCOMAPI InverseTransformNormal(TVector3& normal) =0;
};

/// \}







#endif
