///////////////////////////////////////////////////////////////////////////////
/// @file deAnimatedMesh.hpp
///
/// @brief header for animated mesh loading code
///
/// @author Assassin
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date June 2002
/// @author Assassin
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

//Destiny 3D Actor Class
//A simple MD2 loader to start.  Maybe we could build off this later.
#ifndef DEANIMATEDMESH_H
#define DEANIMATEDMESH_H

#include "deGlobalTypes.hpp"
#include "deMath.hpp"
#include "deResource.hpp"

#if defined(DEANIMATEDMESH_DLL_EXPORTS) || defined(DESTINY3D_EXPORT_ALL)
#	define ACTOR_API extern "C" DEDLL_EXPORT
#elif defined(DESTINY3D_STATIC_LINK)
#	define ACTOR_API extern "C"
#else
#	define ACTOR_API extern "C" DEDLL_IMPORT
#endif

#ifdef USING_DESTINY3D
#ifdef _DEBUG
#	ifdef DESTINY3D_STATIC_LINK
#		pragma comment(lib, "deAnimatedMesh_sd")
#	else
#		pragma comment(lib, "deAnimatedMeshd")
#	endif //DESTINY3D_STATIC_LINK
#else
#	ifdef DESTINY3D_STATIC_LINK
#		pragma comment(lib, "deAnimatedMesh_s")
#	else
#		pragma comment(lib, "deAnimatedMesh")
#	endif //DESTINY3D_STATIC_LINK
#endif //_DEBUG
#endif //USING_DESTINY3D

class IdeAnimatedMesh;
class IdeBitmapProxy;
class IdeRenderTexture;
class IdeVertexBuffer;
class IdeDriver;

	ACTOR_API void		IdeAnimatedMesh_Initialize();
	ACTOR_API long		IdeAnimatedMesh_GetRscInterfaceID();

//class IdeAnimatedMesh : virtual public IdeResourceBase
DE3D_INTERFACE(IdeAnimatedMesh, IdeResourceBase)
{
protected:
	virtual ~IdeAnimatedMesh() {}
public:
	virtual IdeVertexBuffer*	GetVBuffer() = 0;
	virtual IdeVertexBuffer*	GetVBuffer(float Time) = 0;
	virtual IdeRenderTexture*	GetTexture(IdeDriver * pDriver) = 0;

	virtual int					GetNumFrames() = 0;
	virtual int					GetNumVerts() = 0;
	virtual int					GetNumTriangles() = 0;
	virtual int					GetNumSkins() = 0;
	virtual int					GetFrameSize() = 0;
	virtual int					GetNumTexCoords() = 0;

	virtual int					GetCurrentFrame() = 0;
	virtual int					GetNextFrame() = 0;
	virtual float				GetInterpolation() = 0;

	virtual char				*GetSkinName(int index) = 0;

	virtual void				SetAnimSpeed(float FramesPerSec) = 0;
	virtual deBoolean			SetCurrentAnim(const char* AnimName) = 0;
	virtual deBoolean			SetCurrentAnim(int AnimNum) = 0;
	virtual float				GetAnimSpeed() = 0;
	virtual int					GetCurrentAnim() = 0;

	virtual void				SetCurrentFrame(int frame) = 0;
	virtual void				SetNextFrame(int frame) = 0;
	
	virtual void				SetTexture(const char *filename) = 0;
	virtual void				SetTexture(IdeBitmapProxy *tex) = 0;
};



#endif // DEANIMATEDMESH_H
