1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 18:49:54 +00:00
openmw-tes3mp/apps/openmw/mwrender/terrainstorage.hpp

43 lines
1.2 KiB
C++
Raw Normal View History

#ifndef MWRENDER_TERRAINSTORAGE_H
#define MWRENDER_TERRAINSTORAGE_H
#include <memory>
#include <components/esmterrain/storage.hpp>
#include <components/resource/resourcesystem.hpp>
namespace MWRender
{
class LandManager;
/// @brief Connects the ESM Store used in OpenMW with the ESMTerrain storage.
class TerrainStorage : public ESMTerrain::Storage
{
public:
2020-09-13 15:46:27 +00:00
TerrainStorage(Resource::ResourceSystem* resourceSystem, const std::string& normalMapPattern = "", const std::string& normalHeightMapPattern = "", bool autoUseNormalMaps = false, const std::string& specularMapPattern = "", bool autoUseSpecularMaps = false);
~TerrainStorage();
2019-03-19 21:19:26 +00:00
virtual osg::ref_ptr<const ESMTerrain::LandObject> getLand (int cellX, int cellY) override;
virtual const ESM::LandTexture* getLandTexture(int index, short plugin) override;
virtual bool hasData(int cellX, int cellY) override;
/// Get bounds of the whole terrain in cell units
2019-03-19 21:19:26 +00:00
virtual void getBounds(float& minX, float& maxX, float& minY, float& maxY) override;
LandManager* getLandManager() const;
private:
std::unique_ptr<LandManager> mLandManager;
Resource::ResourceSystem* mResourceSystem;
};
}
#endif