Ogre::PageStrategy Class Reference
[Paging]

Defines the interface to a strategy class which is responsible for deciding when Page instances are requested for addition and removal from the paging system. More...

#include <OgrePageStrategy.h>

Inheritance diagram for Ogre::PageStrategy:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PageStrategy (const String &name, PageManager *manager)
virtual ~PageStrategy ()
const StringgetName () const
PageManagergetManager () const
virtual void frameStart (Real timeSinceLastFrame, PagedWorldSection *section)
 Called when the frame starts.
virtual void frameEnd (Real timeElapsed, PagedWorldSection *section)
 Called when the frame ends.
virtual void notifyCamera (Camera *cam, PagedWorldSection *section)
 Called when a camera is used for any kind of rendering.
virtual PageStrategyDatacreateData ()=0
 Create a PageStrategyData instance containing the data specific to this PageStrategy.
virtual void destroyData (PageStrategyData *d)=0
 Destroy a PageStrategyData instance containing the data specific to this PageStrategy.
virtual void updateDebugDisplay (Page *p, SceneNode *sn)=0
 Update the contents of the passed in SceneNode to reflect the debug display of a given page.
virtual PageID getPageID (const Vector3 &worldPos, PagedWorldSection *section)=0
 Get the page ID for a given world position.
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
void * operator new (size_t sz)
void * operator new (size_t sz, void *ptr)
 placement operator new
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
void * operator new[] (size_t sz)
void operator delete (void *ptr)
void operator delete (void *ptr, void *)
void operator delete (void *ptr, const char *, int, const char *)
void operator delete[] (void *ptr)
void operator delete[] (void *ptr, const char *, int, const char *)

Protected Attributes

String mName
PageManagermManager

Detailed Description

Defines the interface to a strategy class which is responsible for deciding when Page instances are requested for addition and removal from the paging system.

Remarks:
The interface is deliberately light, with no specific mention of requesting new Page instances. It is entirely up to the PageStrategy to respond to the events raised on it and to call methods on other classes (such as requesting new pages).

Definition at line 73 of file OgrePageStrategy.h.


Constructor & Destructor Documentation

Ogre::PageStrategy::PageStrategy ( const String name,
PageManager manager 
)

Definition at line 79 of file OgrePageStrategy.h.

virtual Ogre::PageStrategy::~PageStrategy (  )  [virtual]

Definition at line 85 of file OgrePageStrategy.h.


Member Function Documentation

virtual PageStrategyData* Ogre::PageStrategy::createData (  )  [pure virtual]

Create a PageStrategyData instance containing the data specific to this PageStrategy.

This data will be held by a given PagedWorldSection and the structure of the data will be specific to the PageStrategy subclass.

Implemented in Ogre::Grid2DPageStrategy, and Ogre::Grid3DPageStrategy.

virtual void Ogre::PageStrategy::destroyData ( PageStrategyData d  )  [pure virtual]

Destroy a PageStrategyData instance containing the data specific to this PageStrategy.

This data will be held by a given PagedWorldSection and the structure of the data will be specific to the PageStrategy subclass.

Implemented in Ogre::Grid2DPageStrategy, and Ogre::Grid3DPageStrategy.

virtual void Ogre::PageStrategy::frameEnd ( Real  timeElapsed,
PagedWorldSection section 
) [virtual]

Called when the frame ends.

Definition at line 93 of file OgrePageStrategy.h.

virtual void Ogre::PageStrategy::frameStart ( Real  timeSinceLastFrame,
PagedWorldSection section 
) [virtual]

Called when the frame starts.

Definition at line 91 of file OgrePageStrategy.h.

PageManager* Ogre::PageStrategy::getManager (  )  const

Definition at line 88 of file OgrePageStrategy.h.

const String& Ogre::PageStrategy::getName ( void   )  const

Definition at line 87 of file OgrePageStrategy.h.

virtual PageID Ogre::PageStrategy::getPageID ( const Vector3 worldPos,
PagedWorldSection section 
) [pure virtual]

Get the page ID for a given world position.

Returns:
The page ID

Implemented in Ogre::Grid2DPageStrategy, and Ogre::Grid3DPageStrategy.

virtual void Ogre::PageStrategy::notifyCamera ( Camera cam,
PagedWorldSection section 
) [virtual]

Called when a camera is used for any kind of rendering.

Remarks:
This is probably the primary way in which the strategy will request new pages.
Parameters:
cam Camera which is being used for rendering. Class should not rely on this pointer remaining valid permanently because no notification will be given when the camera is destroyed.

Reimplemented in Ogre::Grid2DPageStrategy, and Ogre::Grid3DPageStrategy.

Definition at line 102 of file OgrePageStrategy.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
) [inherited]

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
) [inherited]

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr  )  [inherited]

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
) [inherited]

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr  )  [inherited]

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
) [inherited]

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz  )  [inherited]

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
) [inherited]

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz  )  [inherited]

Definition at line 90 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
) [inherited]

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

virtual void Ogre::PageStrategy::updateDebugDisplay ( Page p,
SceneNode sn 
) [pure virtual]

Update the contents of the passed in SceneNode to reflect the debug display of a given page.

Remarks:
The PageStrategy is to have complete control of the contents of this SceneNode, it must not be altered / added to by others.

Implemented in Ogre::Grid2DPageStrategy, and Ogre::Grid3DPageStrategy.


Member Data Documentation

Definition at line 77 of file OgrePageStrategy.h.

Definition at line 76 of file OgrePageStrategy.h.


The documentation for this class was generated from the following file:

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 23:41:50 2012