OGRE  2.2.4
Object-Oriented Graphics Rendering Engine
Ogre::PageStrategy Class Referenceabstract

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:

Public Member Functions

 PageStrategy (const String &name, PageManager *manager)
 
virtual ~PageStrategy ()
 
virtual PageStrategyDatacreateData ()=0
 Create a PageStrategyData instance containing the data specific to this PageStrategy. More...
 
virtual void destroyData (PageStrategyData *d)=0
 Destroy a PageStrategyData instance containing the data specific to this PageStrategy. More...
 
virtual void frameEnd (Real timeElapsed, PagedWorldSection *section)
 Called when the frame ends. More...
 
virtual void frameStart (Real timeSinceLastFrame, PagedWorldSection *section)
 Called when the frame starts. More...
 
PageManagergetManager () const
 
const StringgetName () const
 
virtual PageID getPageID (const Vector3 &worldPos, PagedWorldSection *section)=0
 Get the page ID for a given world position. More...
 
virtual void notifyCamera (Camera *cam, PagedWorldSection *section)
 Called when a camera is used for any kind of rendering. More...
 
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 *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
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. More...
 

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

Constructor & Destructor Documentation

◆ PageStrategy()

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

◆ ~PageStrategy()

virtual Ogre::PageStrategy::~PageStrategy ( )
inlinevirtual

Member Function Documentation

◆ createData()

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.

◆ destroyData()

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.

◆ frameEnd()

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

Called when the frame ends.

◆ frameStart()

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

Called when the frame starts.

◆ getManager()

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

◆ getName()

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

◆ getPageID()

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.

◆ notifyCamera()

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

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

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

◆ operator delete() [2/3]

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

◆ operator delete() [3/3]

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

◆ operator delete[]() [1/2]

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

◆ operator delete[]() [2/2]

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

◆ operator new() [1/3]

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

operator new, with debug line info

◆ operator new() [2/3]

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

◆ operator new() [3/3]

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

placement operator new

◆ operator new[]() [1/2]

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

array operator new, with debug line info

◆ operator new[]() [2/2]

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

◆ updateDebugDisplay()

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.


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