# OgrePageFileFormats.h File Reference
Components | Paging

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...

`#include "OgrePagingPrerequisites.h"`

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]

  Name | Type | Description
  World Name | char* | The name of the world - should be unique
  PagedWorldSection List | Chunk List | A variable-length list of nested PagedWorldSection chunks

  PagedWorldSection (Identifier 'PWSC')
  [Version 1]

  Name | Type | Description
  World Section Name | char* | The name of the world section - should be unique within world
  Bounding box | AABB | AABB of this world section in world space
  PageStrategy name | char* | The name of the PageStrategy class this world section uses to manage pages
  Page Strategy Data | Nested Chunk | PageStrategy specific data for this world section

  PagedStrategyData (Identifier defined by subclass)
  [Version 1]

  Name | Type | Description
  PageStrategy defined | ??? | This chunk will contain data as defined by the specific PageStrategyData used by the parent PagedWorldSection

  Page (Identifier 'PAGE')
  [Version 1]

  Name | Type | Description
  Page ID | uint32 | The identifier of the page
  PageContentCollection list | Nested chunk list | 1-n nested chunks of type PageContentCollection

  PageContentCollection (Identifier 'PGCC')
  [Version 1]

  Name | Type | Description
  Factory name | char* | The name of the content collection factory
  PageContentCollectionData chunk | Nested chunk | Data required to initialise & configure the content collection

  PageContentCollectionData (Identifier defined by subclass)
  [Version 1]

  Name | Type | Description
  PageContentCollection subclass defined | ??? | This chunk will contain data as defined by the specific PageContentCollection subclass

  PageContent (Identifier 'PGCN')
  [Version 1]

  Name | Type | Description
  Factory name | char* | The name of the content factory
  PageContentData chunk | Nested chunk | Data required to initialise & configure the content

  PageContentData (Identifier defined by subclass)
  [Version 1]

  Name | Type | Description
  PageContent subclass defined | ??? | This chunk will contain data as defined by the specific PageContent subclass

Definition in file OgrePageFileFormats.h.

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun May 8 2011 20:28:09