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

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

		Author:	Arnaud
		Date:	12/9/2003

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

#ifndef __BasicWireframeSet__
#define __BasicWireframeSet__

#if CP_PRAGMA_ONCE
#pragma once
#endif


#include "BasicCOMImplementations.h"
#include "MCBasicTypes.h"
#include "I3DWireframeSet.h"

/// \addtogroup BaseClass
/// \{

/// Basic Wireframe Set class.  Derive from this for a default implementation of I3DExWF and I3DExWireFrameSet.
/// Your class must also inherit from another TBasic* class, and be sure to add a call to 
/// TBasicWireframeSet::QueryInterface before you call TBasicUnknown::QueryInterface
///
/// \see I3DExWF, I3DExWireFrameSet
class TBasicWireframeSet : public I3DExWF, public I3DExWireFrameSet
{
public:
	//IMCUnknown
	virtual MCErr  MCCOMAPI QueryInterface	(const MCIID& riid, void** ppvObj) =0;

	//I3DExWF
	virtual I3DExWireFrameSet*	MCCOMAPI GetNewInterface		()		{ return this; }
	virtual I3DExWireFrame*		MCCOMAPI GetDeprecatedInterface	()		{ return NULL; }

	//I3DExWireFrameSet
	virtual MCCOMErr MCCOMAPI TrackWireFrame	(	I3DShWireFrameSet*		wireFrame, 
													int16					proj, 
													I3DShTreeElement*		tree, 
													I3DEditorHostPanePart*	panePart,
													const TWFHitInfo&		handle,
													const TRACKINFO&		startinfo, 
													const TRACKINFO&		previnfo, 
													const TRACKINFO&		nextinfo,
													I3DShCamera*			camera);

	virtual MCCOMErr MCCOMAPI DataToWireFrame	(I3DShWireFrameSet* wireFrame, int16 proj, I3DShTreeElement* tree,
												 I3DShCamera* camera);
	virtual MCCOMErr MCCOMAPI WireFrameToData	(I3DShWireFrameSet* wireFrame, int16 proj, I3DShTreeElement* tree,
												 I3DShCamera* camera);
	
	// These three functions are not in the interface
	virtual MCCOMErr MCCOMAPI TrackWireFrame	(	I3DShWireFrameSet*	wireFrame, 
													int16				proj, 
													I3DShTreeElement*	tree, 
													const TWFHitInfo&	handle,
													const TRACKINFO&	startinfo, 
													const TRACKINFO&	previnfo, 
													const TRACKINFO&	nextinfo,
													I3DShCamera*		camera);
	virtual MCCOMErr MCCOMAPI TrackWireFrame	(	I3DShWireFrameSet*	wireFrame, 
													int16				proj, 
													I3DShTreeElement*	tree, 
													const TWFHitInfo&	handle,
													const TRACKINFO&	startinfo, 
													const TRACKINFO&	previnfo, 
													const TRACKINFO&	nextinfo);
	virtual MCCOMErr MCCOMAPI DataToWireFrame	(I3DShWireFrameSet* wireFrame, int16 proj, I3DShTreeElement* tree);
	virtual MCCOMErr MCCOMAPI WireFrameToData	(I3DShWireFrameSet* wireFrame, int16 proj, I3DShTreeElement* tree);

	virtual MCCOMErr MCCOMAPI GetWireFrameBBox	(TBBox3D* outBBox, int16	proj, I3DShTreeElement*	tree);
	
	virtual MCCOMErr MCCOMAPI GetGlobalTransform(I3DShTreeElement* tree, TTransform3D& outTransform) { return MC_E_NOTIMPL; }

	virtual void	 MCCOMAPI ShowWFTools		(boolean show)									{}
	virtual boolean	 MCCOMAPI HandlesTool		(int16 inTool);

	virtual boolean  MCCOMAPI IsViewDependent	() const { return false; }

	virtual boolean	 MCCOMAPI TestHit			(I3DShTreeElement* tree, const Ray3D& localRay,const real64 tmin, TWFHitInfo& outInfo)	{ return false; }

	virtual void	 MCCOMAPI GetActionName		(TMCString& outName) {}

	virtual real32	 MCCOMAPI GetScalingFactor()	const { return 1.0f; }
	virtual void	 MCCOMAPI SetScalingFactor(real32 inValue) { }

	virtual boolean	 MCCOMAPI IsBBoxAlwaysUsedForParentBBox() { return true; }
};
/// \}
#endif