1 #ifndef COMPONENTS_TERRAIN_STORAGE_H
2 #define COMPONENTS_TERRAIN_STORAGE_H
29 virtual void getBounds(
float& minX,
float& maxX,
float& minY,
float& maxY) = 0;
39 virtual bool getMinMaxHeights (
float size,
const osg::Vec2f& center,
float& min,
float& max) = 0;
52 virtual void fillVertexBuffers (
int lodLevel,
float size,
const osg::Vec2f& center,
53 osg::ref_ptr<osg::Vec3Array> positions,
54 osg::ref_ptr<osg::Vec3Array> normals,
55 osg::ref_ptr<osg::Vec4Array> colours) = 0;
69 virtual void getBlendmaps (
float chunkSize,
const osg::Vec2f& chunkCenter,
bool pack,
71 std::vector<LayerInfo>& layerList) = 0;
73 virtual float getHeightAt (
const osg::Vec3f& worldPos) = 0;
virtual void fillVertexBuffers(int lodLevel, float size, const osg::Vec2f ¢er, osg::ref_ptr< osg::Vec3Array > positions, osg::ref_ptr< osg::Vec3Array > normals, osg::ref_ptr< osg::Vec4Array > colours)=0
virtual void getBlendmaps(float chunkSize, const osg::Vec2f &chunkCenter, bool pack, ImageVector &blendmaps, std::vector< LayerInfo > &layerList)=0
virtual int getBlendmapScale(float chunkSize)=0
virtual float getCellWorldSize()=0
Get the transformation factor for mapping cell units to world units.
std::vector< osg::ref_ptr< osg::Image > > ImageVector
Definition: storage.hpp:57
Definition: storage.hpp:22
virtual void getBounds(float &minX, float &maxX, float &minY, float &maxY)=0
Get bounds of the whole terrain in cell units.
virtual float getHeightAt(const osg::Vec3f &worldPos)=0
virtual bool getMinMaxHeights(float size, const osg::Vec2f ¢er, float &min, float &max)=0
virtual ~Storage()
Definition: storage.hpp:25
virtual int getCellVertices()=0
Get the number of vertices on one side for each cell. Should be (power of two)+1. ...