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

		ModelerView.h

		Copyright (c)1990 - 1999 MetaCreations. All rights reserved.

		Author:	Jerome Bignon
		Date:	05/18/99

		Revision History

		when		who			what & why
		==========	==========	======================================================
		05/18/99	Jerome		Creation

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

#ifndef __ModelerVIEW__
#define __ModelerVIEW__  

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "BasicMCFCOMImplementations.h"
#include "Modeler.h"
#include "ModelerDef.h"
#include "IModelerView.h"

// Define the ModelerView CLSID ( see the ModelerTreeDef.h file to get R_CLSID_ModelerView value )
extern const MCGUID CLSID_ModelerView;

class Modeler;

struct DrawTreePrivData
{
	IMCGraphicContext*	fGC;
	int32				fNumView;
	real				fZoom;
};

TMCPoint TreePoint3Dto2D( TVector3 *v , int numView , real zoom );

// VIEW Object definition : 
// VIEW Object :

class ModelerView : public TBasicPart,
					   public IModelerView	
{

	public :  
		ModelerView();
		virtual MCCOMErr 	MCCOMAPI QueryInterface	(const MCIID &riid, void** ppvObj);
 		virtual uint32		MCCOMAPI AddRef();
		STANDARD_RELEASE;
 
		virtual void MCCOMAPI	SelfDraw(IMCGraphicContext* graphicContext, const TMCRect& inZone);
	  
		virtual	Modeler*	MCCOMAPI	GetModelerNoAddRef();
		virtual	void		MCCOMAPI	SetModeler(Modeler* TheModeler);
		virtual	void		MCCOMAPI	SetBackgroundColor(const TMCRGBColor& rgbcolor);
		
protected:
		Modeler*			fTreeModeler;
		int					ViewSide;		
		real				fZoom;
		TMCRGBColor			fbackgroundColor;
};

#endif // __VIEW__