You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#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:
|
|
|
|
TerrainStorage(Resource::ResourceSystem* resourceSystem, const std::string& normalMapPattern = "", const std::string& normalHeightMapPatteern = "", bool autoUseNormalMaps = false, const std::string& specularMapPattern = "", bool autoUseSpecularMaps = false);
|
|
~TerrainStorage();
|
|
|
|
virtual osg::ref_ptr<const ESMTerrain::LandObject> getLand (int cellX, int cellY);
|
|
virtual const ESM::LandTexture* getLandTexture(int index, short plugin);
|
|
|
|
/// Get bounds of the whole terrain in cell units
|
|
virtual void getBounds(float& minX, float& maxX, float& minY, float& maxY);
|
|
|
|
LandManager* getLandManager() const;
|
|
|
|
private:
|
|
std::unique_ptr<LandManager> mLandManager;
|
|
|
|
Resource::ResourceSystem* mResourceSystem;
|
|
};
|
|
|
|
}
|
|
|
|
|
|
#endif
|