1 #ifndef COMPONENTS_TERRAIN_WORLD_H
2 #define COMPONENTS_TERRAIN_WORLD_H
5 #include <osg/Referenced>
33 class CompositeMapRenderer;
39 class View :
public osg::Referenced
45 virtual void reset(
unsigned int frame) = 0;
96 virtual void preload(
View* view,
const osg::Vec3f& eyePoint) {}
98 virtual void reportStats(
unsigned int frameNumber, osg::Stats* stats) {}
std::unique_ptr< TextureManager > mTextureManager
Definition: world.hpp:116
Wrapper class that constructs and provides access to the most commonly used resource subsystems...
Definition: resourcesystem.hpp:30
void updateTextureFiltering()
Definition: world.cpp:108
virtual void loadCell(int x, int y)
Definition: world.cpp:82
std::unique_ptr< ChunkManager > mChunkManager
Definition: world.hpp:117
The basic interface for a terrain world. How the terrain chunks are paged and displayed is up to the ...
Definition: world.hpp:52
virtual void clearAssociatedCaches()
Definition: world.cpp:113
std::set< std::pair< int, int > > mLoadedCells
Definition: world.hpp:123
virtual void reportStats(unsigned int frameNumber, osg::Stats *stats)
Definition: world.hpp:98
std::unique_ptr< MWRender::CellBorder > mCellBorder
Definition: world.hpp:119
virtual void cacheCell(View *view, int x, int y)
Definition: world.hpp:77
void setTargetFrameRate(float rate)
See CompositeMapRenderer::setTargetFrameRate.
Definition: world.cpp:98
Storage * mStorage
Definition: world.hpp:106
virtual void setBordersVisible(bool visible)
Definition: world.cpp:69
virtual void unloadCell(int x, int y)
Definition: world.cpp:90
World(osg::Group *parent, osg::Group *compileRoot, Resource::ResourceSystem *resourceSystem, Storage *storage, int nodeMask, int preCompileMask, int borderMask)
Definition: world.cpp:17
Definition: storage.hpp:22
virtual ~World()
Definition: world.cpp:56
osg::ref_ptr< osg::Group > mTerrainRoot
Definition: world.hpp:109
virtual View * createView()
Definition: world.hpp:93
A View is a collection of rendering objects that are visible from a given camera/intersection. The base View class is part of the interface for usage in conjunction with preload feature.
Definition: world.hpp:39
osg::ref_ptr< osg::Group > mCompositeMapCamera
Definition: world.hpp:111
Resource::ResourceSystem * mResourceSystem
Definition: world.hpp:114
virtual void preload(View *view, const osg::Vec3f &eyePoint)
Definition: world.hpp:96
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...
Definition: world.hpp:101
Storage * getStorage()
Definition: world.hpp:103
virtual void reset(unsigned int frame)=0
Reset internal structure so that the next addition to the view will override the previous frame's con...
virtual void enable(bool enabled)
Definition: world.hpp:87
osg::ref_ptr< CompositeMapRenderer > mCompositeMapRenderer
Definition: world.hpp:112
bool mBorderVisible
Definition: world.hpp:121
float getHeightAt(const osg::Vec3f &worldPos)
Definition: world.cpp:103
virtual ~View()
Definition: world.hpp:42
osg::ref_ptr< osg::Group > mParent
Definition: world.hpp:108