Go to the documentation of this file.
29 #ifndef __Ogre_PageManager_H__
30 #define __Ogre_PageManager_H__
50 class PagedWorldSection;
51 class PagedWorldSectionFactory;
A interface class defining a listener which can be used to receive notifications of frame events.
void destroyWorldSection(PagedWorldSection *s)
Destroy an instance of PagedWorldSection.
void destroyContent(PageContent *c)
Destroy an instance of PageContent.
PageProvider * getPageProvider() const
Get the PageProvider which can provide streams for any Page.
const String & getPageResourceGroup() const
Get the resource group that will be used to read/write files when the default load routines are used.
PagedWorld * createWorld(const String &name=StringUtil::BLANK)
Create a new PagedWorld instance.
virtual bool _unprepareProceduralPage(Page *page, PagedWorldSection *section)
Give a manager the opportunity to unprepare page content procedurally.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
PageProvider * mPageProvider
virtual StreamSerialiser * readPageStream(PageID pageID, PagedWorldSection *section)
Get a serialiser set up to read Page data for the given PageID, or null if this provider cannot suppl...
Page strategy which loads new pages based on a regular 2D grid.
const ContentCollectionFactoryMap & getContentCollectionFactories() const
Get a reference to the registered strategies.
A viewpoint from which the scene will be rendered.
void removeWorldSectionFactory(PagedWorldSectionFactory *f)
Remove a PagedWorldSectionFactory implementation.
WorldSectionFactoryMap mWorldSectionFactories
void createStandardStrategies()
void saveWorld(PagedWorld *world, const String &filename)
Save a PagedWorld instance to a file.
StreamSerialiser * _readWorldStream(const String &filename)
Get a serialiser set up to read PagedWorld data for the given world name.
StreamSerialiser * _writeWorldStream(const String &filename)
Get a serialiser set up to write PagedWorld data.
void addWorldSectionFactory(PagedWorldSectionFactory *f)
Add a new PagedWorldSectionFactory implementation.
map< String, PageContentCollectionFactory * >::type ContentCollectionFactoryMap
void setPageProvider(PageProvider *provider)
Set the PageProvider which can provide streams for any Page.
The PageManager is the entry point through which you load all PagedWorld instances,...
ContentFactoryMap mContentFactories
map< String, PageStrategy * >::type StrategyMap
ContentCollectionFactoryMap mContentCollectionFactories
virtual StreamSerialiser * writeWorldStream(const String &filename)
Get a serialiser set up to write PagedWorld data for the given world filename.
String mPageResourceGroup
PageStrategy * getStrategy(const String &name)
Get a PageStrategy.
PageContentCollection * createContentCollection(const String &typeName)
Create a new instance of PageContentCollection using the registered factories.
void addStrategy(PageStrategy *strategy)
Add a new PageStrategy implementation.
virtual bool _loadProceduralPage(Page *page, PagedWorldSection *section)
Give a provider the opportunity to prepare page content procedurally.
virtual bool loadProceduralPage(Page *page, PagedWorldSection *section)
Give a provider the opportunity to load page content procedurally.
Abstract class that can be implemented by the user application to provide a way to retrieve or genera...
virtual bool _unloadProceduralPage(Page *page, PagedWorldSection *section)
Give a manager the opportunity to unload page content procedurally.
SimplePageContentCollectionFactory * mSimpleCollectionFactory
uint32 PageID
Identifier for a page.
void setPagingOperationsEnabled(bool enabled)
Pause or unpause all paging operations.
bool frameEnded(const FrameEvent &evt)
Called just after a frame has been rendered.
const CameraList & getCameraList() const
Returns a list of cameras being tracked.
const ContentFactoryMap & getContentFactories() const
Get a reference to the registered strategies.
Defines the interface to a strategy class which is responsible for deciding when Page instances are r...
bool getPagingOperationsEnabled() const
Get whether paging operations are currently allowed to happen.
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
Factory class for SimplePageContentCollection.
Grid3DPageStrategy * mGrid3DPageStrategy
map< String, PagedWorld * >::type WorldMap
Utility class to generate a sequentially numbered series of names.
void setDebugDisplayLevel(uint8 lvl)
Set the debug display level.
PagedWorldSectionFactory * getWorldSectionFactory(const String &name)
Get a PagedWorldSectionFactory.
Manages the organisation and rendering of a 'scene' i.e.
Definition of the interface for a collection of PageContent instances.
void createStandardContentFactories()
PagedWorld * loadWorld(const String &filename, const String &name=StringUtil::BLANK)
Load a new PagedWorld from a file.
void addContentCollectionFactory(PageContentCollectionFactory *f)
Add a new PageContentCollectionFactory implementation.
void removeContentFactory(PageContentFactory *f)
Remove a PageContentFactory implementation.
This class represents a collection of pages which make up a world.
A factory class for creating types of world section.
void destroyWorld(const String &name)
Destroy a world.
Define the interface to a factory class that will create subclasses of PageContent.
void removeCamera(Camera *c)
Tells the paging system to stop tracking a given camera.
PagedWorld * loadWorld(const DataStreamPtr &stream, const String &name=StringUtil::BLANK)
Load a new PagedWorld from a stream.
PagedWorld * getWorld(const String &name)
Get a named world.
void destroyWorld(PagedWorld *world)
Destroy a world.
Represents a section of the PagedWorld which uses a given PageStrategy, and which is made up of a gen...
Struct containing information about a frame event.
PageContentFactory * getContentFactory(const String &name)
Get a PageContentFactory.
NameGenerator mWorldNameGenerator
Page strategy which loads new pages based on a regular 3D grid.
const StrategyMap & getStrategies() const
Get a reference to the registered strategies.
void cameraDestroyed(Camera *cam)
Called when the camera is being destroyed.
PageContent * createContent(const String &typeName)
Create a new instance of PageContent using the registered factories.
Utility class providing helper methods for reading / writing structured data held in a DataStream.
const WorldMap & getWorlds() const
Get a reference to the worlds that are currently loaded.
void setPageResourceGroup(const String &g)
Set the resource group that will be used to read/write files when the default load routines are used.
const WorldSectionFactoryMap & getWorldSectionFactories() const
Get a reference to the registered strategies.
PagedWorldSection * createWorldSection(const String &typeName, const String &name, PagedWorld *parent, SceneManager *sm)
Create a new instance of PagedWorldSection using the registered factories.
virtual StreamSerialiser * writePageStream(PageID pageID, PagedWorldSection *section)
Get a serialiser set up to write Page data for the given PageID, or null if this provider cannot supp...
Listener interface so you can be notified of Camera events.
map< String, PagedWorldSectionFactory * >::type WorldSectionFactoryMap
virtual bool unprepareProceduralPage(Page *page, PagedWorldSection *section)
Give a provider the opportunity to unprepare page content procedurally.
void removeContentCollectionFactory(PageContentCollectionFactory *f)
Remove a PageContentCollectionFactory implementation.
virtual bool _prepareProceduralPage(Page *page, PagedWorldSection *section)
Give a provider the opportunity to prepare page content procedurally.
virtual bool prepareProceduralPage(Page *page, PagedWorldSection *section)
Give a provider the opportunity to prepare page content procedurally.
void destroyContentCollection(PageContentCollection *coll)
Destroy an instance of PageContentCollection.
void removeStrategy(PageStrategy *strategy)
Remove a PageStrategy implementation.
Interface definition for a unit of content within a page.
void addContentFactory(PageContentFactory *f)
Add a new PageContentFactory implementation.
virtual bool unloadProceduralPage(Page *page, PagedWorldSection *section)
Give a provider the opportunity to unload page content procedurally.
PageContentCollectionFactory * getContentCollectionFactory(const String &name)
Get a PageContentCollectionFactory.
bool frameStarted(const FrameEvent &evt)
Called when a frame is about to begin rendering.
map< String, PageContentFactory * >::type ContentFactoryMap
StreamSerialiser * _readPageStream(PageID pageID, PagedWorldSection *section)
Get a serialiser set up to read Page data for the given PageID.
StreamSerialiser * _writePageStream(PageID pageID, PagedWorldSection *section)
Get a serialiser set up to write Page data for the given PageID.
virtual StreamSerialiser * readWorldStream(const String &filename)
Get a serialiser set up to read PagedWorld data for the given world filename.
void saveWorld(PagedWorld *world, const DataStreamPtr &stream)
Save a PagedWorld instance to a file.
Define the interface to a factory class that will create subclasses of PageContentCollection.
void addCamera(Camera *c)
Tells the paging system to start tracking a given camera.
Grid2DPageStrategy * mGrid2DPageStrategy
bool hasCamera(Camera *c) const
Returns whether or not a given camera is being watched by the paging system.
uint8 getDebugDisplayLevel() const
Get the debug display level.
vector< Camera * >::type CameraList
void cameraPreRenderScene(Camera *cam)
Called prior to the scene being rendered with this camera.
#define _OgrePagingExport
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.