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

		Basic3DImportExport.h

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

		Author:	Ray Dream
		Date:	9/23/98

		Revision History

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

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

#ifndef __Basic3DImportExport__
#define __Basic3DImportExport__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "I3DExImportExport.h"
#include "BasicCOMImplementations.h"

struct I3DShScene;
struct I3DShTreeElement;

/// \addtogroup BaseClass
/// \{

/***********************************************************************\
*                                                                       *
*     TBasic3DExportFilter                                                *
*                                                                       *
\***********************************************************************/
/// Basic 3D Export Filter class.  Derive from this for a default implementation of I3DExExportFilter
/// \see I3DExExportFilter
class TBasic3DExportFilter : public I3DExExportFilter, public TBasicDataExchanger 
{
	public:
		virtual MCCOMErr 	MCCOMAPI QueryInterface		(const MCIID& riid, void** ppvObj);
		virtual uint32 		MCCOMAPI AddRef				() { return TBasicDataExchanger::AddRef(); }

		virtual boolean 	MCCOMAPI Prepare			(I3DShScene* scene, I3DShTreeElement* fatherTree);
		virtual boolean 	MCCOMAPI WantsOptionDialog	();
		virtual MCCOMErr 	MCCOMAPI NeededDiskSpace	(IMCFile* file, I3DShScene* scene, I3DShTreeElement* fatherTree, uint32* diskSpace);
		virtual MCCOMErr 	MCCOMAPI DoExport			(IMCFile* file, I3DShScene* scene, I3DShTreeElement* fatherTree);
		//-- Preview calls
		virtual boolean 	MCCOMAPI WantsPreview		();
		virtual MCCOMErr 	MCCOMAPI GetPreviewSize		(int16* sizeh, int16* sizev);
		virtual MCCOMErr 	MCCOMAPI SetPreview			(TMCPixelBucket* preview);

		virtual boolean		MCCOMAPI WantsTempFile		()	{ return true; }

		virtual boolean		MCCOMAPI WantToSaveParameters() { return true; }
};




/***********************************************************************\
*                                                                       *
*     TBasic3DImportFilter                                                *
*                                                                       *
\***********************************************************************/
/// Basic 3D Import Filter class.  Derive from this for a default implementation of I3DExImportFilter
/// \see I3DExImportFilter
class TBasic3DImportFilter : public I3DExImportFilter, public TBasicDataExchanger 
{
	public:
		virtual MCCOMErr 	MCCOMAPI QueryInterface		(const MCIID& riid, void** ppvObj);
		virtual uint32 		MCCOMAPI AddRef				() { return TBasicDataExchanger::AddRef(); }

		virtual boolean 	MCCOMAPI Prepare			(IMCFile* file, I3DShScene* scene, I3DShTreeElement* fatherTree);
		virtual boolean 	MCCOMAPI WantsOptionDialog	();
		virtual MCCOMErr 	MCCOMAPI DoImport			(IMCFile* file, I3DShScene* scene, I3DShTreeElement* fatherTree, TImportInfo* ioImportInfo)
		{
			return DoImport(file, scene, fatherTree);
		}
		virtual boolean 	MCCOMAPI WantsTopScene		();

		//old interface method
		virtual MCCOMErr 	MCCOMAPI DoImport			(IMCFile* file, I3DShScene* scene, I3DShTreeElement* fatherTree);
};

/// \}

#endif