OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
terrainstorage.hpp
Go to the documentation of this file.
1 #ifndef MWRENDER_TERRAINSTORAGE_H
2 #define MWRENDER_TERRAINSTORAGE_H
3 
4 #include <memory>
5 
7 
9 
10 namespace MWRender
11 {
12 
13  class LandManager;
14 
17  {
18  public:
19 
20  TerrainStorage(Resource::ResourceSystem* resourceSystem, const std::string& normalMapPattern = "", const std::string& normalHeightMapPatteern = "", bool autoUseNormalMaps = false, const std::string& specularMapPattern = "", bool autoUseSpecularMaps = false);
22 
23  virtual osg::ref_ptr<const ESMTerrain::LandObject> getLand (int cellX, int cellY);
24  virtual const ESM::LandTexture* getLandTexture(int index, short plugin);
25 
27  virtual void getBounds(float& minX, float& maxX, float& minY, float& maxY);
28 
29  LandManager* getLandManager() const;
30 
31  private:
32  std::unique_ptr<LandManager> mLandManager;
33 
35  };
36 
37 }
38 
39 
40 #endif
Wrapper class that constructs and provides access to the most commonly used resource subsystems...
Definition: resourcesystem.hpp:30
Definition: landmanager.hpp:17
Definition: loadltex.hpp:28
std::unique_ptr< LandManager > mLandManager
Definition: terrainstorage.hpp:32
LandManager * getLandManager() const
Definition: terrainstorage.cpp:52
Connects the ESM Store used in OpenMW with the ESMTerrain storage.
Definition: terrainstorage.hpp:16
~TerrainStorage()
Definition: terrainstorage.cpp:22
Feeds data from ESM terrain records (ESM::Land, ESM::LandTexture) into the terrain component...
Definition: storage.hpp:44
TerrainStorage(Resource::ResourceSystem *resourceSystem, const std::string &normalMapPattern="", const std::string &normalHeightMapPatteern="", bool autoUseNormalMaps=false, const std::string &specularMapPattern="", bool autoUseSpecularMaps=false)
Definition: terrainstorage.cpp:14
virtual const ESM::LandTexture * getLandTexture(int index, short plugin)
Definition: terrainstorage.cpp:62
virtual void getBounds(float &minX, float &maxX, float &minY, float &maxY)
Get bounds of the whole terrain in cell units.
Definition: terrainstorage.cpp:27
Resource::ResourceSystem * mResourceSystem
Definition: terrainstorage.hpp:34
virtual osg::ref_ptr< const ESMTerrain::LandObject > getLand(int cellX, int cellY)
Definition: terrainstorage.cpp:57