|
|
|
@ -29,8 +29,17 @@ namespace ESMTerrain
|
|
|
|
|
|
|
|
|
|
META_Object(ESMTerrain, LandObject)
|
|
|
|
|
|
|
|
|
|
const ESM::Land::LandData* getData(int flags) const;
|
|
|
|
|
int getPlugin() const;
|
|
|
|
|
inline const ESM::Land::LandData* getData(int flags) const
|
|
|
|
|
{
|
|
|
|
|
if ((mData.mDataLoaded & flags) != flags)
|
|
|
|
|
return nullptr;
|
|
|
|
|
return &mData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline int getPlugin() const
|
|
|
|
|
{
|
|
|
|
|
return mLand->mPlugin;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
const ESM::Land* mLand;
|
|
|
|
@ -105,21 +114,20 @@ namespace ESMTerrain
|
|
|
|
|
private:
|
|
|
|
|
const VFS::Manager* mVFS;
|
|
|
|
|
|
|
|
|
|
void fixNormal (osg::Vec3f& normal, int cellX, int cellY, int col, int row, LandCache& cache);
|
|
|
|
|
void fixColour (osg::Vec4ub& colour, int cellX, int cellY, int col, int row, LandCache& cache);
|
|
|
|
|
void averageNormal (osg::Vec3f& normal, int cellX, int cellY, int col, int row, LandCache& cache);
|
|
|
|
|
inline void fixNormal (osg::Vec3f& normal, int cellX, int cellY, int col, int row, LandCache& cache);
|
|
|
|
|
inline void fixColour (osg::Vec4ub& colour, int cellX, int cellY, int col, int row, LandCache& cache);
|
|
|
|
|
inline void averageNormal (osg::Vec3f& normal, int cellX, int cellY, int col, int row, LandCache& cache);
|
|
|
|
|
|
|
|
|
|
float getVertexHeight (const ESM::Land::LandData* data, int x, int y);
|
|
|
|
|
inline float getVertexHeight (const ESM::Land::LandData* data, int x, int y);
|
|
|
|
|
|
|
|
|
|
const LandObject* getLand(int cellX, int cellY, LandCache& cache);
|
|
|
|
|
inline const LandObject* getLand(int cellX, int cellY, LandCache& cache);
|
|
|
|
|
|
|
|
|
|
// Since plugins can define new texture palettes, we need to know the plugin index too
|
|
|
|
|
// in order to retrieve the correct texture name.
|
|
|
|
|
// pair <texture id, plugin id>
|
|
|
|
|
typedef std::pair<short, short> UniqueTextureId;
|
|
|
|
|
|
|
|
|
|
UniqueTextureId getVtexIndexAt(int cellX, int cellY,
|
|
|
|
|
int x, int y, LandCache&);
|
|
|
|
|
inline UniqueTextureId getVtexIndexAt(int cellX, int cellY, int x, int y, LandCache&);
|
|
|
|
|
std::string getTextureName (UniqueTextureId id);
|
|
|
|
|
|
|
|
|
|
std::map<std::string, Terrain::LayerInfo> mLayerInfoMap;
|
|
|
|
|