1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#ifndef COMPONENTS_ESM_ESMTERRAIN
#define COMPONENTS_ESM_ESMTERRAIN
#include <cstdint>
#include <memory>
#include <span>
#include <vector>
namespace ESM4
{
struct Land;
}
namespace ESM
{
struct Land;
struct LandRecordData;
class LandData
{
public:
LandData();
LandData(const ESM::Land& Land, int loadFlags);
LandData(const ESM4::Land& Land, int loadFlags);
~LandData();
std::span<const float> getHeights() const { return mHeights; }
std::span<const std::int8_t> getNormals() const { return mNormals; }
std::span<const std::uint8_t> getColors() const { return mColors; }
std::span<const std::uint16_t> getTextures() const { return mTextures; }
float getSize() const { return mSize; }
float getMinHeight() const { return mMinHeight; }
float getMaxHeight() const { return mMaxHeight; }
int getLandSize() const { return mLandSize; }
int getLoadFlags() const { return mLoadFlags; }
int getPlugin() const { return mPlugin; }
private:
std::unique_ptr<const ESM::LandRecordData> mData;
int mLoadFlags = 0;
std::vector<float> mHeightsData;
float mMinHeight = 0.f;
float mMaxHeight = 0.f;
float mSize = 0.f;
int mLandSize = 0;
int mPlugin = 0;
std::span<const float> mHeights;
std::span<const std::int8_t> mNormals;
std::span<const std::uint8_t> mColors;
std::span<const std::uint16_t> mTextures;
};
}
#endif // ! COMPNENTS_ESM_ESMTERRAIN
|