|
OpenMW
|
#include <storage.hpp>
Public Types | |
| typedef std::vector < osg::ref_ptr< osg::Image > > | ImageVector |
Public Member Functions | |
| virtual | ~Storage () |
| virtual void | getBounds (float &minX, float &maxX, float &minY, float &maxY)=0 |
| Get bounds of the whole terrain in cell units. More... | |
| virtual bool | getMinMaxHeights (float size, const osg::Vec2f ¢er, float &min, float &max)=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 | getHeightAt (const osg::Vec3f &worldPos)=0 |
| virtual float | getCellWorldSize ()=0 |
| Get the transformation factor for mapping cell units to world units. More... | |
| virtual int | getCellVertices ()=0 |
| Get the number of vertices on one side for each cell. Should be (power of two)+1. More... | |
| virtual int | getBlendmapScale (float chunkSize)=0 |
We keep storage of terrain data abstract here since we need different implementations for game and editor
| typedef std::vector<osg::ref_ptr<osg::Image> > Terrain::Storage::ImageVector |
|
inlinevirtual |
|
pure virtual |
Fill vertex buffers for a terrain chunk.
| lodLevel | LOD level, 0 = most detailed |
| size | size of the terrain chunk in cell units |
| center | center of the chunk in cell units |
| positions | buffer to write vertices |
| normals | buffer to write vertex normals |
| colours | buffer to write vertex colours |
Implemented in ESMTerrain::Storage.
|
pure virtual |
Create textures holding layer blend values for a terrain chunk.
| chunkSize | size of the terrain chunk in cell units |
| chunkCenter | center of the chunk in cell units |
| pack | Whether to pack blend values for up to 4 layers into one texture (one in each channel) - otherwise, each texture contains blend values for one layer only. Shader-based rendering can utilize packing, FFP can't. |
| blendmaps | created blendmaps will be written here |
| layerList | names of the layer textures used will be written here |
Implemented in ESMTerrain::Storage.
|
pure virtual |
|
pure virtual |
Get bounds of the whole terrain in cell units.
Implemented in ESMTerrain::Storage, MWRender::TerrainStorage, and CSVRender::TerrainStorage.
|
pure virtual |
Get the number of vertices on one side for each cell. Should be (power of two)+1.
Implemented in ESMTerrain::Storage.
|
pure virtual |
Get the transformation factor for mapping cell units to world units.
Implemented in ESMTerrain::Storage.
|
pure virtual |
|
pure virtual |
Get the minimum and maximum heights of a terrain region.
| size | size of the chunk in cell units |
| center | center of the chunk in cell units |
| min | min height will be stored here |
| max | max height will be stored here |
Implemented in ESMTerrain::Storage.
1.8.6