ModelsCache.h
Go to the documentation of this file.
1 /*+-------------------------------------------------------------------------+
2  | MultiVehicle simulator (libmvsim) |
3  | |
4  | Copyright (C) 2014-2023 Jose Luis Blanco Claraco |
5  | Copyright (C) 2017 Borys Tymchenko (Odessa Polytechnic University) |
6  | Distributed under 3-clause BSD License |
7  | See COPYING |
8  +-------------------------------------------------------------------------+ */
9 
10 #include <mrpt/opengl/CAssimpModel.h>
11 
12 #include <map>
13 
14 namespace mvsim
15 {
17 {
18  public:
19  static ModelsCache& Instance();
20 
21  struct Options
22  {
23  mrpt::img::TColor modelColor = mrpt::img::TColor::white();
24  std::string modelCull = "NONE";
25  };
26 
27  mrpt::opengl::CAssimpModel::Ptr get(
28  const std::string& url, const Options& options);
29 
30  void clear() { cache.clear(); }
31 
32  private:
33  ModelsCache() = default;
34  ~ModelsCache() = default;
35 
36  std::map<std::string, mrpt::opengl::CAssimpModel::Ptr> cache;
37 };
38 
39 } // namespace mvsim
static ModelsCache & Instance()
Definition: ModelsCache.cpp:21
~ModelsCache()=default
mrpt::img::TColor modelColor
Definition: ModelsCache.h:23
std::map< std::string, mrpt::opengl::CAssimpModel::Ptr > cache
Definition: ModelsCache.h:36
options
ModelsCache()=default


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:21