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

		Teapot.h

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

		Author:	Jerome Bignon
		Date:	05/05/99

		Revision History

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

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

#ifndef __Teapot__
#define __Teapot__  

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "TeapotDef.h"
#include "BasicPrimitive.h"

// Define the Teapot CLSID ( see the TeapotDef.h file to get R_CLSID_Teapot value )

extern const MCGUID CLSID_Teapot;


// Teapot Object definition : 
// Teapot Object :

class Teapot : public TBasicPrimitive
{
	struct TPMap
	{
		TPMap() : fScalingFactor(1) {}

		real32		fScalingFactor;
	};

	public :  
		Teapot();
		
		STANDARD_RELEASE;

		virtual void*	 MCCOMAPI GetExtensionDataBuffer	() { return &fPMap; }
		virtual int32	 MCCOMAPI GetParamsBufferSize		() const	{ return sizeof(fPMap); }

		// Geometric Calls
		virtual void	 MCCOMAPI GetBoundingBox	(TBBox3D& bbox);
		virtual MCCOMErr MCCOMAPI EnumPatches		(EnumPatchesCallback callback, void* privData, boolean& isClosed);

		// Shading Calls
		virtual uint32	 MCCOMAPI GetUVSpaceCount	();

		// Handle scene magnitude
		virtual boolean		MCCOMAPI IsScalable() const			{ return true; }
		virtual real32		MCCOMAPI GetScalingFactor()	const	{ return fPMap.fScalingFactor; }
		virtual void		MCCOMAPI SetScalingFactor(real32 inValue) { fPMap.fScalingFactor = inValue; }

	protected:
		TPMap		fPMap;
};

#endif // __TEAPOT__
