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

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

		Author:	charles
		Date:	5/12/2005

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

#ifndef __I3DExDisplacementPrimitive__
#define __I3DExDisplacementPrimitive__

#if CP_PRAGMA_ONCE
#pragma once
#endif

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

MCDEFINE_GUID_H(IID_I3DExDisplacementPrimitive);


struct TDisplacementParameters;
struct I3DShInstance;

struct I3DExDisplacementPrimitive : public IMCUnknown
{
	// ****************************************************************************
	//								Displace
	// 
	/// Apply a displacement mapping to a mesh and returns another mesh.
	/// 
	/// \param outMesh     The mesh with displacement mapping applied.
	/// \param inMesh      The original mesh
	/// \param shader      A pointer to the displacement function
	/// \param parameters  The parameters of the displacement mapping.
	/// 
	virtual void MCCOMAPI Displace(FacetMesh** outMesh,FacetMesh* inMesh,I3DShShader* shader,const TDisplacementParameters& parameters,I3DShInstance* instance)=0;

	// ****************************************************************************
	//								DisplaceMesh
	// 
	/// Apply a displacement mapping to a mesh and returns another mesh.
	/// 
	/// \param outMesh     The mesh with displacement mapping applied.
	/// \param inMesh      The original mesh
	/// \param shader      A pointer to the displacement function
	/// \param parameters  The parameters of the displacement mapping.
	/// 
	virtual void MCCOMAPI DisplaceMesh(FacetMesh** outMesh,MeshDataStructure::TMesh* inMesh,I3DShShader* shader,const TDisplacementParameters& parameters,I3DShInstance* instance)=0;

	// ****************************************************************************
	//								DisplaceMesh
	// 
	/// Apply a displacement mapping to a mesh and returns another mesh.
	/// 
	/// \param outMesh     The mesh with displacement mapping applied.
	/// \param inFaceSet   The original faceSet
	/// \param shader      A pointer to the displacement function
	/// \param parameters  The parameters of the displacement mapping.
	/// 
	virtual void MCCOMAPI DisplaceMesh(FacetMesh** outMesh,TFaceSet* inFaceSet,I3DShShader* shader,const TDisplacementParameters& parameters,I3DShInstance* instance)=0;

	// ****************************************************************************
	//								GetBoundingBox
	// 
	/// Returns the bounding box of an object after displacement mapping is applied
	/// 
	/// \param inOutBoundingBox   The bounding to modify
	/// \param parameters         The parameters of the displacement mapping.
	/// 
	virtual void MCCOMAPI GetBoundingBox(TBBox3D& inOutBoundingBox,const TDisplacementParameters& parameters)=0;

	// ****************************************************************************
	//								DisplaceMesh2
	// 
	/// Apply a displacement mapping to a mesh and returns another mesh.
	/// 
	/// \param outMesh     The mesh with displacement mapping applied.
	/// \param inFaceSet   The original faceSet
	/// \param shaders     An array of pointers to the displacement functions
	/// \param parameters  The parameters of the displacement mapping.
	/// 
	virtual void MCCOMAPI DisplaceMesh2(FacetMesh** outMesh,TFaceSet* inFaceSet,TMCCountedPtrArray<I3DShShader>& shaders,I3DShInstance* instance)=0;

	// ****************************************************************************
	//								Displace2
	// 
	/// Apply a displacement mapping to a mesh and returns another mesh.
	/// 
	/// \param outMesh     The mesh with displacement mapping applied.
	/// \param inMesh      The original mesh
	/// \param shaders     An array of pointers to the displacement functions
	/// \param parameters  The parameters of the displacement mapping.
	/// 
	virtual void MCCOMAPI Displace2(FacetMesh** outMesh,FacetMesh* inMesh,TMCCountedPtrArray<I3DShShader>& shaders,I3DShInstance* instance)=0;

	// ****************************************************************************
	//								GetBoundingBox2
	// 
	/// Returns the bounding box of an object after displacement mapping is applied
	/// 
	/// \param inOutBoundingBox   The bounding to modify
	/// \param parameters         The parameters of the displacement mapping.
	/// 
	virtual void MCCOMAPI GetBoundingBox2(TBBox3D& inOutBoundingBox)=0;

};



#endif
