Pioneer
Loading...
Searching...
No Matches
ModelCache.h
Go to the documentation of this file.
1// Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#ifndef _MODELCACHE_H
5#define _MODELCACHE_H
6/*
7 * This class is a quick thoughtless hack
8 * Also it only deals in New Models
9 */
10#include "libs.h"
11#include <stdexcept>
12
13namespace Graphics {
14 class Renderer;
15}
16namespace SceneGraph {
17 class Model;
18}
19
21public:
22 struct ModelNotFoundException : public std::runtime_error {
24 std::runtime_error("Could not find model") {}
25 };
28 SceneGraph::Model *FindModel(const std::string &);
29 void Flush();
30
31private:
32 typedef std::map<std::string, SceneGraph::Model *> ModelMap;
33 ModelMap m_models;
34 Graphics::Renderer *m_renderer;
35};
36
37#endif
Definition Renderer.h:44
Definition ModelCache.h:20
~ModelCache()
Definition ModelCache.cpp:13
SceneGraph::Model * FindModel(const std::string &)
Definition ModelCache.cpp:18
void Flush()
Definition ModelCache.cpp:36
Definition Model.h:88
Definition Background.h:14
Definition CityOnPlanet.h:31
Definition ModelCache.h:22
ModelNotFoundException()
Definition ModelCache.h:23