OgrePageFileFormats.h File Reference

The paging file format is a composite one - a single file / stream can contain data which is not necessarily all read by a single class. More...

Go to the source code of this file.

Detailed Description

The paging file format is a composite one - a single file / stream can contain data which is not necessarily all read by a single class.

Instead, data chunks can be read by different classes, allowing the format to be extended to different types smoothly.

Paging world files have by default an extension ".world", but that is not a requirement. Internally, the only thing that matters is the data chunks and their identifiers, which are 4-character codes embedded in a uint32 as calculated by StreamSerialiser::makeIdentifier. All data will be read and written using DataStream and the StreamSerialiser class.
Data types are expressed at the lowest level exposed by the StreamSerialiser class, which is used to read / write this file.
Chunk Definitions
PagedWorld (Identifier 'PWLD')
[Version 1]
NameTypeDescription
World Namechar*The name of the world - should be unique
PagedWorldSection ListChunk ListA variable-length list of nested PagedWorldSection chunks
PagedWorldSection (Identifier 'PWSC')
[Version 1]
NameTypeDescription
World Section Namechar*The name of the world section - should be unique within world
Bounding boxAABBAABB of this world section in world space
PageStrategy namechar*The name of the PageStrategy class this world section uses to manage pages
Page Strategy DataNested ChunkPageStrategy specific data for this world section
PagedStrategyData (Identifier defined by subclass)
[Version 1]
NameTypeDescription
PageStrategy defined???This chunk will contain data as defined by the specific PageStrategyData used by the parent PagedWorldSection
Page (Identifier 'PAGE')
[Version 1]
NameTypeDescription
Page IDuint32The identifier of the page
PageContentCollection listNested chunk list1-n nested chunks of type PageContentCollection
PageContentCollection (Identifier 'PGCC')
[Version 1]
NameTypeDescription
Factory namechar*The name of the content collection factory
PageContentCollectionData chunkNested chunkData required to initialise & configure the content collection
PageContentCollectionData (Identifier defined by subclass)
[Version 1]
NameTypeDescription
PageContentCollection subclass defined???This chunk will contain data as defined by the specific PageContentCollection subclass
PageContent (Identifier 'PGCN')
[Version 1]
NameTypeDescription
Factory namechar*The name of the content factory
PageContentData chunkNested chunkData required to initialise & configure the content
PageContentData (Identifier defined by subclass)
[Version 1]
NameTypeDescription
PageContent subclass defined???This chunk will contain data as defined by the specific PageContent subclass

Definition in file OgrePageFileFormats.h.


Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.