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

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

		Author:	Charles
		Date:	11/8/2001

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

#ifndef __BasicRendererBox__
#define __BasicRendererBox__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "BasicCOMImplementations.h"
#include "I3DExRendererBox.h"
/// \addtogroup BaseClass
/// \{
/********************************************************************************\
*                                                                                *
*     TBasicInteractiveRenderer                                                  *
*                                                                                *
\********************************************************************************/
/// Basic Renderer Box class.  Derive from this for a default implementation of I3DExRendererBox
/// \see I3DExRendererBox
class TBasicRendererBox : public TBasicDataExchanger,public I3DExRendererBox
{
public:
	//				IMCUnknown methods
    virtual MCErr  MCCOMAPI QueryInterface(const MCIID& riid, void** ppvObj);
    virtual uint32 MCCOMAPI AddRef() { return TBasicDataExchanger::AddRef(); }

	//				IExDataExchanger
	virtual void		MCCOMAPI Clone(IExDataExchanger** clonedObject,IMCUnknown* pUnkOuter)
	{
		TBasicDataExchanger::Clone(clonedObject,pUnkOuter);
	}
	virtual boolean		MCCOMAPI IsEqual(IExDataExchanger * otherDataExchanger)
	{
		return TBasicDataExchanger::IsEqual(otherDataExchanger);
	}
	virtual MCCOMErr	MCCOMAPI GetParameter(IDType keyword, void *parameter)
	{
		return TBasicDataExchanger::GetParameter(keyword,parameter);
	}
	virtual MCCOMErr	MCCOMAPI SetParameter(IDType keyword, void *parameter)
	{
		return TBasicDataExchanger::SetParameter(keyword,parameter);
	}
	virtual MCCOMErr 	MCCOMAPI ExtensionDataChanged()
	{
		return TBasicDataExchanger::ExtensionDataChanged();
	}
	virtual MCCOMErr 	MCCOMAPI HandleEvent(MessageID message, IMFResponder* source, void* data)
	{
		return TBasicDataExchanger::HandleEvent(message,source,data);
	}
	virtual MCCOMErr 	MCCOMAPI SimpleHandleEvent(MessageID message, IMFResponder* source, void* data)
	{
		return TBasicDataExchanger::SimpleHandleEvent(message,source,data);
	}
	virtual void		MCCOMAPI GetUIHandler(TUIHandlerFunctionPtr& outHandler)
	{
		TBasicDataExchanger::GetUIHandler(outHandler);
	}
	virtual int16 		MCCOMAPI GetResID()
	{
		return TBasicDataExchanger::GetResID();
	}

	virtual int16		MCCOMAPI GetMiniPartID()		{ return TBasicDataExchanger::GetMiniPartID(); }
	virtual MCCOMErr	MCCOMAPI OverridesMiniPartID()	{ return TBasicDataExchanger::OverridesMiniPartID(); }

	virtual MCCOMErr MCCOMAPI InitComponent()
	{
		return TBasicDataExchanger::InitComponent();
	}
	virtual MCCOMErr MCCOMAPI CopyComponentExtraData(IExDataExchanger* dest)
	{
		return TBasicDataExchanger::CopyComponentExtraData(dest);
	}

	//			I3DExRendererBox methods
	
	virtual void MCCOMAPI	SetCamera(I3DShCamera* camera, const TBBox2D& viewPane);
	virtual void MCCOMAPI	SetScene(I3DShScene* scene);

	virtual void MCCOMAPI	SetWorkingBox(IWorkingBox* workingBox);

	virtual void MCCOMAPI	DeleteRenderableCache(I3DShRenderable& renderable);
	
	virtual void  MCCOMAPI	PreDraw(void* awnd, const TMCRect& windowContentRect, const TMCRect& windowUpdateRect);
	virtual void  MCCOMAPI	DrawInstances(const TRenderableAndTfmArray& instances,const TRenderable2DArray& renderables2D);
	virtual MCErr MCCOMAPI	PostDraw();

	virtual MCCOMErr MCCOMAPI DrawOnScreen(void* awnd,const TMCRect& windowContentRect, const TMCRect& windowUpdateRect);
	virtual MCCOMErr MCCOMAPI DrawInGC(IMCGraphicContext* gc,const TMCRect& windowContentRect, const TMCRect& windowUpdateRect);

	virtual void	MCCOMAPI SetRenderingMode(const InteractiveSettings::ERenderMode renderingMode);	
	virtual uint32	MCCOMAPI GetRenderingMode();
	virtual void	MCCOMAPI GetRenderingModeIDs(TMCArray<ResourceID>& renderingModes);	
	
	virtual void MCCOMAPI	SetRenderActivity(const InteractiveSettings::ERenderActivity renderActivity);

	virtual void MCCOMAPI	Set2DZoomAndPan(const TVector2& zoom,const TVector2& pan);

	virtual void MCCOMAPI	Dehydrate();
	virtual void MCCOMAPI	Rehydrate();

	virtual MCCOMErr MCCOMAPI PreDrawChannels(TMCPixelBucket*			colorChannel,
											  TMCPixelBucket*			depthChannel,
											  TMCPixelBucket*			objectChannel,
											  const boolean				useAverageZ);

	virtual boolean	 MCCOMAPI MustDrawInSeparateWindow() { return false; }
 
	virtual void PrepareToDestroy();

	virtual void	MCCOMAPI SetPlaneImage(TMCPixelBucket* bucket, TMCPoint& startPoint){}
};

/// \}

#endif
