Pyrogenesis  trunk
SkeletonAnimManager.h
Go to the documentation of this file.
1 /* Copyright (C) 2009 Wildfire Games.
2  * This file is part of 0 A.D.
3  *
4  * 0 A.D. is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * 0 A.D. is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 /*
19  * Owner of all skeleton animations
20  */
21 
22 #ifndef INCLUDED_SKELETONANIMMANAGER
23 #define INCLUDED_SKELETONANIMMANAGER
24 
25 #include <map>
26 #include <set>
27 #include "lib/file/vfs/vfs_path.h"
28 #include <boost/unordered_map.hpp>
29 
30 class CColladaManager;
31 class CSkeletonAnimDef;
32 class CStr8;
33 
34 ///////////////////////////////////////////////////////////////////////////////
35 // CSkeletonAnimManager : owner class of all skeleton anims - manages creation,
36 // loading and destruction of animation data
38 {
40 public:
41  // constructor, destructor
42  CSkeletonAnimManager(CColladaManager& colladaManager);
44 
45  // return a given animation by filename; return null if filename doesn't
46  // refer to valid animation file
47  CSkeletonAnimDef* GetAnimation(const VfsPath& pathname);
48 
49 private:
50  // map of all known animations. Value is NULL if it failed to load.
51  boost::unordered_map<VfsPath, CSkeletonAnimDef*> m_Animations;
52 
54 };
55 
56 #endif
CColladaManager & m_ColladaManager
Definition: SkeletonAnimManager.h:53
CSkeletonAnimDef * GetAnimation(const VfsPath &pathname)
Definition: SkeletonAnimManager.cpp:52
boost::unordered_map< VfsPath, CSkeletonAnimDef * > m_Animations
Definition: SkeletonAnimManager.h:51
Definition: SkeletonAnimDef.h:44
Definition: path.h:77
~CSkeletonAnimManager()
Definition: SkeletonAnimManager.cpp:42
NONCOPYABLE(CSkeletonAnimManager)
Definition: SkeletonAnimManager.h:37
CSkeletonAnimManager(CColladaManager &colladaManager)
Definition: SkeletonAnimManager.cpp:35
Definition: ColladaManager.h:27