OpenMW
|
Simple terrain implementation that loads cells in a grid, with no LOD. More...
#include <terraingrid.hpp>
Public Member Functions | |
TerrainGrid (osg::Group *parent, Resource::ResourceSystem *resourceSystem, osgUtil::IncrementalCompileOperation *ico, Storage *storage, int nodeMask, Shader::ShaderManager *shaderManager=NULL, SceneUtil::UnrefQueue *unrefQueue=NULL) | |
~TerrainGrid () | |
virtual osg::ref_ptr< osg::Node > | cacheCell (int x, int y) |
virtual void | loadCell (int x, int y) |
virtual void | unloadCell (int x, int y) |
void | updateCache () |
void | updateTextureFiltering () |
Public Member Functions inherited from Terrain::World | |
World (osg::Group *parent, Resource::ResourceSystem *resourceSystem, osgUtil::IncrementalCompileOperation *ico, Storage *storage, int nodeMask) | |
virtual | ~World () |
float | getHeightAt (const osg::Vec3f &worldPos) |
Storage * | getStorage () |
Private Types | |
typedef std::map< std::string, osg::ref_ptr< osg::Texture2D > > | TextureCache |
typedef std::map< std::pair < int, int >, osg::ref_ptr < osg::Node > > | Grid |
Private Member Functions | |
osg::ref_ptr< osg::Node > | buildTerrain (osg::Group *parent, float chunkSize, const osg::Vec2f &chunkCenter) |
Private Attributes | |
unsigned int | mNumSplits |
TextureCache | mTextureCache |
OpenThreads::Mutex | mTextureCacheMutex |
Grid | mGrid |
Grid | mGridCache |
OpenThreads::Mutex | mGridCacheMutex |
BufferCache | mCache |
osg::ref_ptr < SceneUtil::UnrefQueue > | mUnrefQueue |
Shader::ShaderManager * | mShaderManager |
Additional Inherited Members | |
Protected Attributes inherited from Terrain::World | |
Storage * | mStorage |
osg::ref_ptr< osg::Group > | mParent |
osg::ref_ptr< osg::Group > | mTerrainRoot |
Resource::ResourceSystem * | mResourceSystem |
osg::ref_ptr < osgUtil::IncrementalCompileOperation > | mIncrementalCompileOperation |
Simple terrain implementation that loads cells in a grid, with no LOD.
|
private |
|
private |
Terrain::TerrainGrid::TerrainGrid | ( | osg::Group * | parent, |
Resource::ResourceSystem * | resourceSystem, | ||
osgUtil::IncrementalCompileOperation * | ico, | ||
Storage * | storage, | ||
int | nodeMask, | ||
Shader::ShaderManager * | shaderManager = NULL , |
||
SceneUtil::UnrefQueue * | unrefQueue = NULL |
||
) |
Terrain::TerrainGrid::~TerrainGrid | ( | ) |
|
private |
Load a terrain cell and store it in cache for later use.
Reimplemented from Terrain::World.
|
virtual |
Clear cached objects that are no longer referenced
Reimplemented from Terrain::World.
|
virtual |
Apply the scene manager's texture filtering settings to all cached textures.
Reimplemented from Terrain::World.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |