1 #ifndef COMPONENTS_TERRAIN_STORAGE_H
2 #define COMPONENTS_TERRAIN_STORAGE_H
28 virtual void getBounds(
float& minX,
float& maxX,
float& minY,
float& maxY) = 0;
38 virtual bool getMinMaxHeights (
float size,
const osg::Vec2f& center,
float& min,
float& max) = 0;
51 virtual void fillVertexBuffers (
int lodLevel,
float size,
const osg::Vec2f& center,
52 osg::ref_ptr<osg::Vec3Array> positions,
53 osg::ref_ptr<osg::Vec3Array> normals,
54 osg::ref_ptr<osg::Vec4Array> colours) = 0;
68 virtual void getBlendmaps (
float chunkSize,
const osg::Vec2f& chunkCenter,
bool pack,
70 std::vector<LayerInfo>& layerList) = 0;
72 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 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:56
We keep storage of terrain data abstract here since we need different implementations for game and ed...
Definition: storage.hpp:21
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:24
virtual int getCellVertices()=0
Get the number of vertices on one side for each cell. Should be (power of two)+1. ...
virtual LayerInfo getDefaultLayer()=0