C# Class Axiom.Components.Paging.PagedWorldSection

Represents a section of the PagedWorld which uses a given PageStrategy, and which is made up of a generally localised set of Page instances.
Show file Open project: WolfgangSt/axiom Class Usage Examples

Public Properties

Property Type Description
CHUNK_ID uint
CHUNK_VERSION ushort

Protected Properties

Property Type Description
mAABB Axiom.Math.AxisAlignedBox
mName string
mPageProvider PageProvider
mPages Page>.Dictionary
mParent PageWorld
mSceneMgr Axiom.Core.SceneManager
mStrategy Axiom.Components.Paging.PageStrategy
mStrategyData IPageStrategyData

Public Methods

Method Description
AttachPage ( Page page ) : void

Attach a page to this section.

DetachPage ( Page page ) : void

Detach a page to this section.

FrameEnd ( float timeElapsed ) : void

Called when the frame ends

FrameStart ( float timeSinceLastFrame ) : void

Called when the frame starts

GetPage ( PageID pageID ) : Page

Retrieves a Page.

GetPageID ( Vector3 worldPos ) : PageID

Get the page ID for a given world position.

HoldPage ( PageID pageID ) : void

Ask for a page to be kept in memory if it's loaded.

Load ( StreamSerializer stream ) : bool

Load this section from a stream (returns true if successful)

LoadOrCreatePage ( Vector3 worldPos ) : Page

Load or create a page against this section covering the given world space position.

LoadPage ( PageID pageID ) : void

Ask for a page to be loaded with the given (section-relative) PageID

LoadPage ( PageID pageID, bool forceSynchronous ) : void

Ask for a page to be loaded with the given (section-relative) PageID

LoadProcedualPage ( Page page ) : bool

Give a section the opportunity to load page content procedurally

NotifyCamerea ( Camera cam ) : void

Notify a section of the current camera

PagedWorldSection ( PageWorld parent ) : System

Construct a new instance, specifying just the parent (expecting to load).

PagedWorldSection ( string name, PageWorld parent, Axiom.Components.Paging.PageStrategy strategy, SceneManager sm ) : System

PrepareProcedualePage ( Page page ) : bool

Give a section the opportunity to prepare page content procedurally.

ReadPageStream ( PageID pageID ) : StreamSerializer

Get a serialiser set up to read Page data for the given PageID.

RemoveAllPages ( ) : void

Remove all pages immediately.

Save ( StreamSerializer stream ) : void

Save this section to a stream

SetSceneManager ( SceneManager sm ) : void

Change the SceneManager.

SetSceneManager ( string smName ) : void

Change the SceneManager.

SetStrategy ( string stratName ) : void

ToString ( ) : string

UnloadPage ( Page page, bool sync ) : void

UnloadPage ( PageID pageId ) : void

Ask for a page to be unloaded with the given (section-relative) PageID

UnloadPage ( PageID pageID, bool forceSynchonous ) : void

Ask for a page to be unloaded with the given (section-relative) PageID

UnloadProcedualPage ( Page page ) : bool

Give a section the opportunity to unload page content procedurally.

UnprepareProcedualPage ( Page page ) : bool

Give a section the opportunity to unprepare page content procedurally.

This method indicates that a page should be retained if it's already in memory, but if it's not then it won't trigger a load. This is useful for retaining pages that have just gone out of range, but which you don't want to unload just yet because it's quite possible they may come back into the active set again very quickly / easily. But at the same time, if they've already been purged you don't want to force them to load. This is the 'maybe' region of pages.

WritePageStream ( PageID pageID ) : StreamSerializer

Get a serialiser set up to write Page data for the given PageID.

Method Details

AttachPage() public method

Attach a page to this section.
public AttachPage ( Page page ) : void
page Page
return void

DetachPage() public method

Detach a page to this section.
public DetachPage ( Page page ) : void
page Page
return void

FrameEnd() public method

Called when the frame ends
public FrameEnd ( float timeElapsed ) : void
timeElapsed float
return void

FrameStart() public method

Called when the frame starts
public FrameStart ( float timeSinceLastFrame ) : void
timeSinceLastFrame float
return void

GetPage() public method

Retrieves a Page.
public GetPage ( PageID pageID ) : Page
pageID PageID
return Page

GetPageID() public method

Get the page ID for a given world position.
public GetPageID ( Vector3 worldPos ) : PageID
worldPos Vector3
return PageID

HoldPage() public method

Ask for a page to be kept in memory if it's loaded.
public HoldPage ( PageID pageID ) : void
pageID PageID
return void

Load() public method

Load this section from a stream (returns true if successful)
public Load ( StreamSerializer stream ) : bool
stream Axiom.Serialization.StreamSerializer
return bool

LoadOrCreatePage() public method

Load or create a page against this section covering the given world space position.
public LoadOrCreatePage ( Vector3 worldPos ) : Page
worldPos Vector3
return Page

LoadPage() public method

Ask for a page to be loaded with the given (section-relative) PageID
public LoadPage ( PageID pageID ) : void
pageID PageID The page ID to load
return void

LoadPage() public method

Ask for a page to be loaded with the given (section-relative) PageID
public LoadPage ( PageID pageID, bool forceSynchronous ) : void
pageID PageID The page ID to load
forceSynchronous bool If true, the page will always be loaded synchronously
return void

LoadProcedualPage() public method

Give a section the opportunity to load page content procedurally
public LoadProcedualPage ( Page page ) : bool
page Page
return bool

NotifyCamerea() public method

Notify a section of the current camera
public NotifyCamerea ( Camera cam ) : void
cam Axiom.Core.Camera
return void

PagedWorldSection() public method

Construct a new instance, specifying just the parent (expecting to load).
public PagedWorldSection ( PageWorld parent ) : System
parent PageWorld
return System

PagedWorldSection() public method

public PagedWorldSection ( string name, PageWorld parent, Axiom.Components.Paging.PageStrategy strategy, SceneManager sm ) : System
name string
parent PageWorld
strategy Axiom.Components.Paging.PageStrategy
sm Axiom.Core.SceneManager
return System

PrepareProcedualePage() public method

Give a section the opportunity to prepare page content procedurally.
public PrepareProcedualePage ( Page page ) : bool
page Page
return bool

ReadPageStream() public method

Get a serialiser set up to read Page data for the given PageID.
public ReadPageStream ( PageID pageID ) : StreamSerializer
pageID PageID
return Axiom.Serialization.StreamSerializer

RemoveAllPages() public method

Remove all pages immediately.
public RemoveAllPages ( ) : void
return void

Save() public method

Save this section to a stream
public Save ( StreamSerializer stream ) : void
stream Axiom.Serialization.StreamSerializer
return void

SetSceneManager() public method

Change the SceneManager.
public SetSceneManager ( SceneManager sm ) : void
sm Axiom.Core.SceneManager The instance of the SceneManager
return void

SetSceneManager() public method

Change the SceneManager.
public SetSceneManager ( string smName ) : void
smName string The instance name of the SceneManager
return void

SetStrategy() public method

public SetStrategy ( string stratName ) : void
stratName string
return void

ToString() public method

public ToString ( ) : string
return string

UnloadPage() public method

public UnloadPage ( Page page, bool sync ) : void
page Page
sync bool
return void

UnloadPage() public method

Ask for a page to be unloaded with the given (section-relative) PageID
public UnloadPage ( PageID pageId ) : void
pageId PageID The page ID to unload
return void

UnloadPage() public method

Ask for a page to be unloaded with the given (section-relative) PageID
public UnloadPage ( PageID pageID, bool forceSynchonous ) : void
pageID PageID The page ID to unload
forceSynchonous bool If true, the page will always be unloaded synchronously
return void

UnloadProcedualPage() public method

Give a section the opportunity to unload page content procedurally.
public UnloadProcedualPage ( Page page ) : bool
page Page
return bool

UnprepareProcedualPage() public method

Give a section the opportunity to unprepare page content procedurally.
This method indicates that a page should be retained if it's already in memory, but if it's not then it won't trigger a load. This is useful for retaining pages that have just gone out of range, but which you don't want to unload just yet because it's quite possible they may come back into the active set again very quickly / easily. But at the same time, if they've already been purged you don't want to force them to load. This is the 'maybe' region of pages.
public UnprepareProcedualPage ( Page page ) : bool
page Page
return bool

WritePageStream() public method

Get a serialiser set up to write Page data for the given PageID.
public WritePageStream ( PageID pageID ) : StreamSerializer
pageID PageID
return Axiom.Serialization.StreamSerializer

Property Details

CHUNK_ID public static property

public static uint CHUNK_ID
return uint

CHUNK_VERSION public static property

public static ushort CHUNK_VERSION
return ushort

mAABB protected property

protected AxisAlignedBox,Axiom.Math mAABB
return Axiom.Math.AxisAlignedBox

mName protected property

protected string mName
return string

mPageProvider protected property

protected PageProvider,Axiom.Components.Paging mPageProvider
return PageProvider

mPages protected property

protected Dictionary mPages
return Page>.Dictionary

mParent protected property

protected PageWorld,Axiom.Components.Paging mParent
return PageWorld

mSceneMgr protected property

protected SceneManager,Axiom.Core mSceneMgr
return Axiom.Core.SceneManager

mStrategy protected property

protected PageStrategy,Axiom.Components.Paging mStrategy
return Axiom.Components.Paging.PageStrategy

mStrategyData protected property

protected IPageStrategyData mStrategyData
return IPageStrategyData