OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Terrain::QuadTreeWorld Class Reference

Terrain implementation that loads cells into a Quad Tree, with geometry LOD and texture LOD. The entire world is displayed at all times. More...

#include <quadtreeworld.hpp>

Inheritance diagram for Terrain::QuadTreeWorld:
Collaboration diagram for Terrain::QuadTreeWorld:

Public Member Functions

 QuadTreeWorld (osg::Group *parent, osg::Group *compileRoot, Resource::ResourceSystem *resourceSystem, Storage *storage, int nodeMask, int preCompileMask=~0, int borderMask=0)
 
 ~QuadTreeWorld ()
 
void accept (osg::NodeVisitor &nv)
 
virtual void enable (bool enabled)
 
void cacheCell (View *view, int x, int y)
 
ViewcreateView ()
 
void preload (View *view, const osg::Vec3f &eyePoint)
 
void reportStats (unsigned int frameNumber, osg::Stats *stats)
 
virtual void setDefaultViewer (osg::Object *obj)
 Set the default viewer (usually a Camera), used as viewpoint for any viewers that don't use their own viewpoint. More...
 
- Public Member Functions inherited from Terrain::World
 World (osg::Group *parent, osg::Group *compileRoot, Resource::ResourceSystem *resourceSystem, Storage *storage, int nodeMask, int preCompileMask, int borderMask)
 
virtual ~World ()
 
void setTargetFrameRate (float rate)
 See CompositeMapRenderer::setTargetFrameRate. More...
 
void updateTextureFiltering ()
 
float getHeightAt (const osg::Vec3f &worldPos)
 
virtual void clearAssociatedCaches ()
 
virtual void loadCell (int x, int y)
 
virtual void unloadCell (int x, int y)
 
virtual void setBordersVisible (bool visible)
 
StoragegetStorage ()
 

Private Member Functions

void ensureQuadTreeBuilt ()
 

Private Attributes

osg::ref_ptr< RootNodemRootNode
 
osg::ref_ptr< ViewDataMapmViewDataMap
 
OpenThreads::Mutex mQuadTreeMutex
 
bool mQuadTreeBuilt
 

Additional Inherited Members

- Protected Attributes inherited from Terrain::World
StoragemStorage
 
osg::ref_ptr< osg::Group > mParent
 
osg::ref_ptr< osg::Group > mTerrainRoot
 
osg::ref_ptr< osg::Group > mCompositeMapCamera
 
osg::ref_ptr
< CompositeMapRenderer
mCompositeMapRenderer
 
Resource::ResourceSystemmResourceSystem
 
std::unique_ptr< TextureManagermTextureManager
 
std::unique_ptr< ChunkManagermChunkManager
 
std::unique_ptr
< MWRender::CellBorder
mCellBorder
 
bool mBorderVisible
 
std::set< std::pair< int, int > > mLoadedCells
 

Detailed Description

Terrain implementation that loads cells into a Quad Tree, with geometry LOD and texture LOD. The entire world is displayed at all times.

Constructor & Destructor Documentation

Terrain::QuadTreeWorld::QuadTreeWorld ( osg::Group *  parent,
osg::Group *  compileRoot,
Resource::ResourceSystem resourceSystem,
Storage storage,
int  nodeMask,
int  preCompileMask = ~0,
int  borderMask = 0 
)
Terrain::QuadTreeWorld::~QuadTreeWorld ( )

Member Function Documentation

void Terrain::QuadTreeWorld::accept ( osg::NodeVisitor &  nv)

Here is the call graph for this function:

Here is the caller graph for this function:

void Terrain::QuadTreeWorld::cacheCell ( View view,
int  x,
int  y 
)
virtual

Load a terrain cell at maximum LOD and store it in the View for later use.

Note
Thread safe.

Reimplemented from Terrain::World.

Here is the call graph for this function:

View * Terrain::QuadTreeWorld::createView ( )
virtual

Create a View to use with preload feature. The caller is responsible for deleting the view.

Note
Thread safe.

Reimplemented from Terrain::World.

void Terrain::QuadTreeWorld::enable ( bool  enabled)
virtual

Reimplemented from Terrain::World.

Here is the call graph for this function:

void Terrain::QuadTreeWorld::ensureQuadTreeBuilt ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void Terrain::QuadTreeWorld::preload ( View view,
const osg::Vec3f &  eyePoint 
)
virtual
Note
Thread safe, as long as you do not attempt to load into the same view from multiple threads.

Reimplemented from Terrain::World.

Here is the call graph for this function:

void Terrain::QuadTreeWorld::reportStats ( unsigned int  frameNumber,
osg::Stats *  stats 
)
virtual

Reimplemented from Terrain::World.

void Terrain::QuadTreeWorld::setDefaultViewer ( osg::Object *  obj)
virtual

Set the default viewer (usually a Camera), used as viewpoint for any viewers that don't use their own viewpoint.

Reimplemented from Terrain::World.

Member Data Documentation

bool Terrain::QuadTreeWorld::mQuadTreeBuilt
private
OpenThreads::Mutex Terrain::QuadTreeWorld::mQuadTreeMutex
private
osg::ref_ptr<RootNode> Terrain::QuadTreeWorld::mRootNode
private
osg::ref_ptr<ViewDataMap> Terrain::QuadTreeWorld::mViewDataMap
private

The documentation for this class was generated from the following files: