Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
MeshManager.h
Go to the documentation of this file.
1/* Copyright (C) 2019 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#ifndef INCLUDED_MESHMANAGER
19#define INCLUDED_MESHMANAGER
20
22
23#include <memory>
24#include <unordered_map>
25
26class CModelDef;
27using CModelDefPtr = std::shared_ptr<CModelDef>;
28
29class CColladaManager;
30
32{
34public:
35 CMeshManager(CColladaManager& colladaManager);
37
38 CModelDefPtr GetMesh(const VfsPath& pathname);
39
40private:
41 using mesh_map = std::unordered_map<VfsPath, std::weak_ptr<CModelDef> >;
44};
45
46#endif
std::shared_ptr< CModelDef > CModelDefPtr
Definition: MeshManager.h:27
Definition: ColladaManager.h:26
Definition: MeshManager.h:32
NONCOPYABLE(CMeshManager)
CMeshManager(CColladaManager &colladaManager)
Definition: MeshManager.cpp:32
~CMeshManager()
Definition: MeshManager.cpp:37
std::unordered_map< VfsPath, std::weak_ptr< CModelDef > > mesh_map
Definition: MeshManager.h:41
CColladaManager & m_ColladaManager
Definition: MeshManager.h:43
CModelDefPtr GetMesh(const VfsPath &pathname)
Definition: MeshManager.cpp:41
mesh_map m_MeshMap
Definition: MeshManager.h:42
Definition: ModelDef.h:141
Definition: path.h:80