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

	Tweener.h

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

	Author:	Jerome Bignon

	Date:	06/21/99

	Revision History

	when		who			what & why
	=========== ===========	=============================================================

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

#ifndef __Tweener__
#define __Tweener__  

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include	"Basic3DCOMImplementations.h"
#include	"APITypes.h"
#include	"MCColorRGBA.h"
#include	"TweenerDef.h"

// Define the Tweener CLSID ( see the TweenerDef.h file to get the R_CLSID_Tweener value )

extern const MCGUID CLSID_Tweener;


 

struct TweenerData 
{
	int16 fNbOsc;
	real fExpCoef;
};

 
// Tweener Object :
class Tweener : public TBasicTweener
{
	public :  
		Tweener();
		STANDARD_RELEASE;

	// IExDataExchanger methods :
		virtual void*				MCCOMAPI     GetExtensionDataBuffer();
		virtual int32				MCCOMAPI	 GetParamsBufferSize	() const	{ return sizeof(fData);}
		virtual MCCOMErr			MCCOMAPI     ExtensionDataChanged();
		virtual int16				MCCOMAPI     GetResID();

	// I3DExTweener methods
		virtual MCCOMErr 	MCCOMAPI SimpleTween		(real &result, int32 time, int32 time1, int32 time2);

	private :
		TweenerData     fData;   // Tweener Data
		real64          fCosCoef;
		real64          fExpCoef;
};


#endif
