2007-05-07 18:33:24 +02:00
|
|
|
/**
|
|
|
|
* =========================================================================
|
|
|
|
* File : SkeletonAnimManager.h
|
|
|
|
* Project : 0 A.D.
|
|
|
|
* Description : Owner of all skeleton animations
|
|
|
|
* =========================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INCLUDED_SKELETONANIMMANAGER
|
|
|
|
#define INCLUDED_SKELETONANIMMANAGER
|
2004-05-30 02:46:58 +02:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <set>
|
|
|
|
|
2007-03-01 19:52:53 +01:00
|
|
|
class CColladaManager;
|
|
|
|
class CSkeletonAnimDef;
|
|
|
|
class CStr8;
|
2004-05-30 02:46:58 +02:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// CSkeletonAnimManager : owner class of all skeleton anims - manages creation,
|
|
|
|
// loading and destruction of animation data
|
2007-03-01 19:52:53 +01:00
|
|
|
class CSkeletonAnimManager : boost::noncopyable
|
2004-05-30 02:46:58 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// constructor, destructor
|
2007-03-01 19:52:53 +01:00
|
|
|
CSkeletonAnimManager(CColladaManager& colladaManager);
|
2004-05-30 02:46:58 +02:00
|
|
|
~CSkeletonAnimManager();
|
|
|
|
|
|
|
|
// return a given animation by filename; return null if filename doesn't
|
|
|
|
// refer to valid animation file
|
2007-03-01 19:52:53 +01:00
|
|
|
CSkeletonAnimDef* GetAnimation(const CStr8& filename);
|
2004-05-30 02:46:58 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
CSkeletonAnimDef* LoadAnimation(const char* filename);
|
|
|
|
|
2007-03-01 19:52:53 +01:00
|
|
|
// map of all known animations. Value is NULL if it failed to load.
|
|
|
|
std::map<CStr8, CSkeletonAnimDef*> m_Animations;
|
|
|
|
|
|
|
|
CColladaManager& m_ColladaManager;
|
2004-05-30 02:46:58 +02:00
|
|
|
};
|
|
|
|
|
2004-06-02 17:03:17 +02:00
|
|
|
#endif
|