Represents a section of the PagedWorld which uses a given PageStrategy, and which is made up of a generally localised set of Page instances. More...
#include <OgrePagedWorldSection.h>
Public Types | |
typedef map< PageID, Page * >::type | PageMap |
Public Member Functions | |
PagedWorldSection (const String &name, PagedWorld *parent, SceneManager *sm) | |
Construct a new instance, specifying the parent and scene manager. More... | |
virtual | ~PagedWorldSection () |
virtual bool | _loadProceduralPage (Page *page) |
Give a section the opportunity to prepare page content procedurally. More... | |
virtual bool | _prepareProceduralPage (Page *page) |
Give a section the opportunity to prepare page content procedurally. More... | |
virtual StreamSerialiser * | _readPageStream (PageID pageID) |
Get a serialiser set up to read Page data for the given PageID. More... | |
virtual bool | _unloadProceduralPage (Page *page) |
Give a section the opportunity to unload page content procedurally. More... | |
virtual bool | _unprepareProceduralPage (Page *page) |
Give a section the opportunity to unprepare page content procedurally. More... | |
virtual StreamSerialiser * | _writePageStream (PageID pageID) |
Get a serialiser set up to write Page data for the given PageID. More... | |
virtual void | frameEnd (Real timeElapsed) |
Called when the frame ends. More... | |
virtual void | frameStart (Real timeSinceLastFrame) |
Called when the frame starts. More... | |
virtual const AxisAlignedBox & | getBoundingBox () const |
Get the bounds of this section. More... | |
PageManager * | getManager () const |
virtual const String & | getName () const |
Get the name of this section. More... | |
virtual Page * | getPage (PageID pageID) |
Retrieves a Page. More... | |
virtual PageID | getPageID (const Vector3 &worldPos) |
Get the page ID for a given world position. More... | |
virtual PageProvider * | getPageProvider () const |
Get the PageProvider which can provide streams for Pages in this section. More... | |
virtual SceneManager * | getSceneManager () const |
Get the current SceneManager. More... | |
virtual PageStrategy * | getStrategy () const |
Get the page strategy which this section is using. More... | |
virtual PageStrategyData * | getStrategyData () const |
Get the data required by the PageStrategy which is specific to this world section. More... | |
virtual const String & | getType () |
Get the type name of this section. More... | |
virtual PagedWorld * | getWorld () const |
Get the parent world. More... | |
virtual void | holdPage (PageID pageID) |
Ask for a page to be kept in memory if it's loaded. More... | |
virtual bool | load (StreamSerialiser &stream) |
Load this section from a stream (returns true if successful) More... | |
virtual Page * | loadOrCreatePage (const Vector3 &worldPos) |
Load or create a page against this section covering the given world space position. More... | |
virtual void | loadPage (PageID pageID, bool forceSynchronous=false) |
Ask for a page to be loaded with the given (section-relative) PageID. More... | |
virtual void | notifyCamera (Camera *cam) |
Notify a section of the current camera. More... | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void * | operator new[] (size_t sz) |
virtual void | removeAllPages () |
Remove all pages immediately. More... | |
virtual void | save (StreamSerialiser &stream) |
Save this section to a stream. More... | |
virtual void | setBoundingBox (const AxisAlignedBox &box) |
Set the bounds of this section. More... | |
virtual void | setPageProvider (PageProvider *provider) |
Set the PageProvider which can provide streams Pages in this section. More... | |
virtual void | setSceneManager (SceneManager *sm) |
Change the SceneManager. More... | |
virtual void | setSceneManager (const String &smName) |
Change the SceneManager. More... | |
virtual void | setStrategy (PageStrategy *strat) |
Change the page strategy. More... | |
virtual void | setStrategy (const String &stratName) |
Change the page strategy. More... | |
virtual void | unloadPage (PageID pageID, bool forceSynchronous=false) |
Ask for a page to be unloaded with the given (section-relative) PageID. More... | |
virtual void | unloadPage (Page *p, bool forceSynchronous=false) |
Ask for a page to be unloaded with the given (section-relative) PageID. More... | |
Static Public Attributes | |
static const uint32 | CHUNK_ID |
static const uint16 | CHUNK_VERSION |
Protected Member Functions | |
virtual void | loadSubtypeData (StreamSerialiser &ser) |
Load data specific to a subtype of this class (if any) More... | |
virtual void | saveSubtypeData (StreamSerialiser &ser) |
Protected Attributes | |
AxisAlignedBox | mAABB |
String | mName |
PageProvider * | mPageProvider |
PageMap | mPages |
PagedWorld * | mParent |
SceneManager * | mSceneMgr |
PageStrategy * | mStrategy |
PageStrategyData * | mStrategyData |
Friends | |
_OgrePagingExport friend std::ostream & | operator<< (std::ostream &o, const PagedWorldSection &p) |
Function for writing to a stream. More... | |
Represents a section of the PagedWorld which uses a given PageStrategy, and which is made up of a generally localised set of Page instances.
Definition at line 69 of file OgrePagedWorldSection.h.
typedef map<PageID, Page*>::type Ogre::PagedWorldSection::PageMap |
Definition at line 72 of file OgrePagedWorldSection.h.
Ogre::PagedWorldSection::PagedWorldSection | ( | const String & | name, |
PagedWorld * | parent, | ||
SceneManager * | sm | ||
) |
Construct a new instance, specifying the parent and scene manager.
|
virtual |
|
virtual |
Give a section the opportunity to prepare page content procedurally.
|
virtual |
Give a section the opportunity to prepare page content procedurally.
|
virtual |
Get a serialiser set up to read Page data for the given PageID.
pageID | The ID of the page being requested |
|
virtual |
Give a section the opportunity to unload page content procedurally.
|
virtual |
Give a section the opportunity to unprepare page content procedurally.
|
virtual |
Get a serialiser set up to write Page data for the given PageID.
pageID | The ID of the page being requested |
|
virtual |
Called when the frame ends.
|
virtual |
Called when the frame starts.
|
virtual |
Get the bounds of this section.
PageManager* Ogre::PagedWorldSection::getManager | ( | ) | const |
|
inlinevirtual |
Get the name of this section.
Definition at line 99 of file OgrePagedWorldSection.h.
Get the page ID for a given world position.
|
inlinevirtual |
Get the PageProvider which can provide streams for Pages in this section.
Definition at line 271 of file OgrePagedWorldSection.h.
|
inlinevirtual |
Get the current SceneManager.
Definition at line 130 of file OgrePagedWorldSection.h.
|
inlinevirtual |
Get the page strategy which this section is using.
Definition at line 101 of file OgrePagedWorldSection.h.
|
inlinevirtual |
Get the data required by the PageStrategy which is specific to this world section.
Definition at line 135 of file OgrePagedWorldSection.h.
|
virtual |
Get the type name of this section.
|
inlinevirtual |
Get the parent world.
Definition at line 133 of file OgrePagedWorldSection.h.
|
virtual |
Ask for a page to be kept in memory if it's loaded.
|
virtual |
Load this section from a stream (returns true if successful)
Load or create a page against this section covering the given world space position.
|
virtual |
Ask for a page to be loaded with the given (section-relative) PageID.
pageID | The page ID to load |
forceSynchronous | If true, the page will always be loaded synchronously |
Reimplemented in Ogre::TerrainPagedWorldSection.
|
inlineprotectedvirtual |
Load data specific to a subtype of this class (if any)
Reimplemented in Ogre::TerrainPagedWorldSection.
Definition at line 84 of file OgrePagedWorldSection.h.
|
virtual |
Notify a section of the current camera.
|
inlineinherited |
Definition at line 96 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 102 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
operator new, with debug line info
Definition at line 68 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 73 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
array operator new, with debug line info
Definition at line 86 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 91 of file OgreMemoryAllocatedObject.h.
|
virtual |
Remove all pages immediately.
|
virtual |
Save this section to a stream.
|
inlineprotectedvirtual |
Reimplemented in Ogre::TerrainPagedWorldSection.
Definition at line 85 of file OgrePagedWorldSection.h.
|
virtual |
Set the bounds of this section.
|
inlinevirtual |
Set the PageProvider which can provide streams Pages in this section.
Definition at line 268 of file OgrePagedWorldSection.h.
|
virtual |
Change the SceneManager.
|
virtual |
Change the SceneManager.
smName | The instance name of the SceneManager |
|
virtual |
Change the page strategy.
|
virtual |
Change the page strategy.
|
virtual |
Ask for a page to be unloaded with the given (section-relative) PageID.
pageID | The page ID to unload |
forceSynchronous | If true, the page will always be unloaded synchronously |
Reimplemented in Ogre::TerrainPagedWorldSection.
|
virtual |
Ask for a page to be unloaded with the given (section-relative) PageID.
p | The Page to unload |
forceSynchronous | If true, the page will always be unloaded synchronously |
|
friend |
Function for writing to a stream.
|
static |
Definition at line 89 of file OgrePagedWorldSection.h.
|
static |
Definition at line 90 of file OgrePagedWorldSection.h.
|
protected |
Definition at line 75 of file OgrePagedWorldSection.h.
|
protected |
Definition at line 74 of file OgrePagedWorldSection.h.
|
protected |
Definition at line 80 of file OgrePagedWorldSection.h.
|
protected |
Definition at line 79 of file OgrePagedWorldSection.h.
|
protected |
Definition at line 76 of file OgrePagedWorldSection.h.
|
protected |
Definition at line 81 of file OgrePagedWorldSection.h.
|
protected |
Definition at line 77 of file OgrePagedWorldSection.h.
|
protected |
Definition at line 78 of file OgrePagedWorldSection.h.