2009-04-18 19:00:33 +02:00
|
|
|
/* Copyright (C) 2009 Wildfire Games.
|
|
|
|
* This file is part of 0 A.D.
|
|
|
|
*
|
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2007-05-07 18:33:24 +02:00
|
|
|
#ifndef INCLUDED_MESHMANAGER
|
|
|
|
#define INCLUDED_MESHMANAGER
|
2004-11-08 23:02:01 +01:00
|
|
|
|
2007-03-01 19:52:53 +01:00
|
|
|
#include "ps/CStr.h"
|
2009-11-03 22:46:35 +01:00
|
|
|
#include "lib/file/vfs/vfs_path.h"
|
2007-03-01 19:52:53 +01:00
|
|
|
|
2006-06-02 03:01:39 +02:00
|
|
|
#include <boost/shared_ptr.hpp>
|
2007-03-01 19:52:53 +01:00
|
|
|
#include <boost/weak_ptr.hpp>
|
2004-11-08 23:02:01 +01:00
|
|
|
|
2004-12-12 20:43:55 +01:00
|
|
|
class CModelDef;
|
2007-12-20 21:21:45 +01:00
|
|
|
typedef shared_ptr<CModelDef> CModelDefPtr;
|
2006-12-20 04:22:24 +01:00
|
|
|
|
2007-03-01 19:52:53 +01:00
|
|
|
class CColladaManager;
|
2004-11-08 23:02:01 +01:00
|
|
|
|
2009-01-03 19:40:28 +01:00
|
|
|
class CMeshManager
|
2004-11-08 23:02:01 +01:00
|
|
|
{
|
2009-01-03 19:40:28 +01:00
|
|
|
NONCOPYABLE(CMeshManager);
|
2004-11-08 23:02:01 +01:00
|
|
|
public:
|
2007-03-01 19:52:53 +01:00
|
|
|
CMeshManager(CColladaManager& colladaManager);
|
2006-12-20 04:22:24 +01:00
|
|
|
~CMeshManager();
|
|
|
|
|
2009-11-03 22:46:35 +01:00
|
|
|
CModelDefPtr GetMesh(const VfsPath& pathname);
|
2004-11-08 23:02:01 +01:00
|
|
|
|
|
|
|
private:
|
2009-11-03 22:46:35 +01:00
|
|
|
typedef STL_HASH_MAP<CStrW, boost::weak_ptr<CModelDef>, CStrW_hash_compare> mesh_map;
|
2007-03-01 19:52:53 +01:00
|
|
|
mesh_map m_MeshMap;
|
|
|
|
CColladaManager& m_ColladaManager;
|
2004-11-08 23:02:01 +01:00
|
|
|
};
|
|
|
|
|
2004-11-24 00:56:10 +01:00
|
|
|
#endif
|