29#ifndef __Ogre_TerrainPagedWorldSection_H__
30#define __Ogre_TerrainPagedWorldSection_H__
#define _OgreTerrainExport
Specialisation of PageStrategyData for Grid2DPageStrategy.
Page strategy which loads new pages based on a regular 2D grid.
PagedWorldSection(const String &name, PagedWorld *parent, SceneManager *sm)
Construct a new instance, specifying the parent and scene manager.
This class represents a collection of pages which make up a world.
Manages the organisation and rendering of a 'scene' i.e.
Utility class providing helper methods for reading / writing structured data held in a DataStream.
Helper class to assist you in managing multiple terrain instances that are connected to each other.
virtual void defineTerrain(long x, long y)
Define a 'slot' in the terrain grid - in this case to be loaded from a generated file name.
virtual void define(TerrainGroup *terrainGroup, long x, long y)
virtual ~TerrainDefiner()
virtual Real getHoldRadius()
Get the Holding radius.
void handleResponse(const WorkQueue::Response *res, const WorkQueue *srcQ)
WorkQueue::ResponseHandler override.
unsigned long mNextLoadingTime
static const uint16 WORKQUEUE_LOAD_TERRAIN_PAGE_REQUEST
void unloadPage(PageID pageID, bool forceSynchronous=false)
Overridden from PagedWorldSection.
void loadPage(PageID pageID, bool forceSynchronous=false)
Overridden from PagedWorldSection.
TerrainDefiner * mTerrainDefiner
virtual void setPageRange(int32 minX, int32 minY, int32 maxX, int32 maxY)
Set the index range of all Pages (values outside this will be ignored)
virtual void init(TerrainGroup *grp)
Initialise this section from an existing TerrainGroup instance.
WorkQueue::Response * handleRequest(const WorkQueue::Request *req, const WorkQueue *srcQ)
WorkQueue::RequestHandler override.
virtual void syncSettings()
virtual void setPageRangeMinX(int32 minX)
Set the index range of all Pages (values outside this will be ignored)
virtual int32 getPageRangeMinX() const
get the index range of all Pages (values outside this will be ignored)
virtual void setLoadRadius(Real sz)
Set the loading radius.
virtual void setPageRangeMinY(int32 minY)
Set the index range of all Pages (values outside this will be ignored)
virtual Real getLoadRadius() const
Get the loading radius.
virtual ~TerrainPagedWorldSection()
virtual uint32 getLoadingIntervalMs() const
Get the interval between the loading of single pages in milliseconds (ms)
virtual TerrainGroup * getTerrainGroup()
Get the TerrainGroup which this world section is using.
virtual int32 getPageRangeMaxX() const
get the index range of all Pages (values outside this will be ignored)
virtual Grid2DPageStrategy * getGridStrategy() const
Convenience method - this section always uses a grid strategy.
virtual int32 getPageRangeMaxY() const
get the index range of all Pages (values outside this will be ignored)
void loadSubtypeData(StreamSerialiser &ser)
Overridden from PagedWorldSection.
virtual void setLoadingIntervalMs(uint32 loadingIntervalMs)
Set the interval between the loading of single pages in milliseconds (ms)
virtual void setHoldRadius(Real sz)
Set the Holding radius.
TerrainPagedWorldSection(const String &name, PagedWorld *parent, SceneManager *sm)
Constructor.
uint32 mLoadingIntervalMs
virtual void setPageRangeMaxY(int32 maxY)
Set the index range of all Pages (values outside this will be ignored)
void setDefiner(TerrainDefiner *terrainDefiner)
TerrainGroup * mTerrainGroup
std::list< PageID > mPagesInLoading
virtual int32 getPageRangeMinY() const
get the index range of all Pages (values outside this will be ignored)
void saveSubtypeData(StreamSerialiser &ser)
virtual void setPageRangeMaxX(int32 maxX)
Set the index range of all Pages (values outside this will be ignored)
virtual Grid2DPageStrategyData * getGridStrategyData() const
Convenience method - this section always uses a grid strategy.
Interface definition for a handler of requests.
General purpose request structure.
Interface definition for a handler of responses.
Interface to a general purpose request / response style background work queue.
uint32 PageID
Identifier for a page.
float Real
Software floating point type.
GeneralAllocatedObject TerrainAlloc
General purpose response structure.