29 #ifndef __Ogre_PagedWorld_H__
30 #define __Ogre_PagedWorld_H__
#define _OgrePagingExport
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
A viewpoint from which the scene will be rendered.
Utility class to generate a sequentially numbered series of names.
The PageManager is the entry point through which you load all PagedWorld instances,...
Abstract class that can be implemented by the user application to provide a way to retrieve or genera...
Defines the interface to a strategy class which is responsible for deciding when Page instances are r...
Represents a section of the PagedWorld which uses a given PageStrategy, and which is made up of a gen...
This class represents a collection of pages which make up a world.
void destroySection(const String &name)
Destroy a section of world.
const String & getName() const
void save(StreamSerialiser &stream)
Save world data to a serialiser.
static const uint32 CHUNK_SECTIONDECLARATION_ID
PagedWorldSection * createSection(PageStrategy *strategy, SceneManager *sceneMgr, const String §ionName=StringUtil::BLANK)
Create a manually defined new section of the world.
void destroySection(PagedWorldSection *sec)
Destroy a section of world.
virtual void frameStart(Real timeSinceLastFrame)
Called when the frame starts.
virtual bool _prepareProceduralPage(Page *page, PagedWorldSection *section)
Give a world the opportunity to prepare page content procedurally.
static const uint16 CHUNK_VERSION
map< String, PagedWorldSection * >::type SectionMap
virtual bool _loadProceduralPage(Page *page, PagedWorldSection *section)
Give a world the opportunity to prepare page content procedurally.
StreamSerialiser * _writePageStream(PageID pageID, PagedWorldSection *section)
Get a serialiser set up to read Page data for the given PageID.
PagedWorldSection * createSection(const String &strategyName, SceneManager *sceneMgr, const String §ionName=StringUtil::BLANK)
Create a new manually defined section of the world.
PageProvider * getPageProvider() const
Get the PageProvider which can provide streams for Pages in this world.
PageManager * getManager() const
Get the manager of this world.
PagedWorld(const String &name, PageManager *manager)
Constructor.
void save(const String &filename)
Save world data to a file.
StreamSerialiser * _readPageStream(PageID pageID, PagedWorldSection *section)
Get a serialiser set up to read Page data for the given PageID.
size_t getSectionCount() const
Get the number of sections this world has.
void destroyAllSections()
Destroy all world sections.
virtual bool _unprepareProceduralPage(Page *page, PagedWorldSection *section)
Give a world the opportunity to unprepare page content procedurally.
static const uint32 CHUNK_ID
NameGenerator mSectionNameGenerator
PagedWorldSection * getSection(const String &name)
Retrieve a section of the world.
void load(const DataStreamPtr &stream)
Load world data from a stream.
bool load(StreamSerialiser &stream)
Load world data from a serialiser (returns true if successful)
virtual void notifyCamera(Camera *cam)
Notify a world of the current camera.
PagedWorldSection * createSection(SceneManager *sceneMgr, const String &typeName, const String §ionName=StringUtil::BLANK)
Create a new section of the world based on a specialised type.
void setPageProvider(PageProvider *provider)
Set the PageProvider which can provide streams for Pages in this world.
void save(const DataStreamPtr &stream)
Save world data to a stream.
const SectionMap & getSections() const
Retrieve a const reference to all the sections in this world.
PageProvider * mPageProvider
void load(const String &filename)
Load world data from a file.
virtual bool _unloadProceduralPage(Page *page, PagedWorldSection *section)
Give a world the opportunity to unload page content procedurally.
virtual void frameEnd(Real timeElapsed)
Called when the frame ends.
Manages the organisation and rendering of a 'scene' i.e.
Utility class providing helper methods for reading / writing structured data held in a DataStream.
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
std::ostream & operator<<(std::ostream &o, const TRect< T > &r)
uint32 PageID
Identifier for a page.
float Real
Software floating point type.