Ogre::Grid2DPageStrategy Class Reference
Components » Paging

Page strategy which loads new pages based on a regular 2D grid. More...

`#include <OgreGrid2DPageStrategy.h>`

Inheritance diagram for Ogre::Grid2DPageStrategy:
[legend]

## Public Member Functions

| Grid2DPageStrategy (PageManager *manager)
| ~Grid2DPageStrategy ()
PageStrategyData * | createData ()
| Create a PageStrategyData instance containing the data specific to this PageStrategy. More...
void | destroyData (PageStrategyData *d)
| 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...
PageManager * | getManager () const
const String & | getName () const
PageID | getPageID (const Vector3 &worldPos, PagedWorldSection *section)
| Get the page ID for a given world position. More...
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)
void | updateDebugDisplay (Page *p, SceneNode *sn)
| Update the contents of the passed in SceneNode to reflect the debug display of a given page. More...

## Protected Attributes

PageManager * | mManager
String | mName

## Detailed Description

Page strategy which loads new pages based on a regular 2D grid.

Remarks
  The grid can be up to 65536 x 65536 cells in size. PageIDs are generated like this: (row * 65536) + col. The grid is centred around the grid origin, such that the boundaries of the cell around that origin are [-CellSize/2, CellSize/2)

Definition at line 231 of file OgreGrid2DPageStrategy.h.

## Constructor & Destructor Documentation

## Grid2DPageStrategy()

Ogre::Grid2DPageStrategy::Grid2DPageStrategy | ( | PageManager * | manager | ) |

## ~Grid2DPageStrategy()

Ogre::Grid2DPageStrategy::~Grid2DPageStrategy | ( |  | ) |

## Member Function Documentation

## createData()

PageStrategyData* Ogre::Grid2DPageStrategy::createData | ( |  | ) |

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.

Implements Ogre::PageStrategy.

## destroyData()

void Ogre::Grid2DPageStrategy::destroyData | ( | PageStrategyData * | d | ) |

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.

Implements Ogre::PageStrategy.

## frameEnd()

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

virtual inherited

Called when the frame ends.

Definition at line 93 of file OgrePageStrategy.h.

## frameStart()

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

virtual inherited

Called when the frame starts.

Definition at line 91 of file OgrePageStrategy.h.

## getManager()

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

inherited

Definition at line 88 of file OgrePageStrategy.h.

## getName()

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

inherited

Definition at line 87 of file OgrePageStrategy.h.

## getPageID()

PageID Ogre::Grid2DPageStrategy::getPageID | ( | const Vector3 & | worldPos,
|  | PagedWorldSection * | section
| ) |  |

virtual

Get the page ID for a given world position.

Returns
  The page ID

Implements Ogre::PageStrategy.

## notifyCamera()

void Ogre::Grid2DPageStrategy::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 from Ogre::PageStrategy.

## operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

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

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

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

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

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

template<class Alloc >

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

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

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 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

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

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

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

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 86 of file OgreMemoryAllocatedObject.h.

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

template<class Alloc >

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

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## updateDebugDisplay()

void Ogre::Grid2DPageStrategy::updateDebugDisplay | ( | Page * | p,
|  | SceneNode * | sn
| ) |  |

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.

Implements Ogre::PageStrategy.

## Member Data Documentation

## mManager

PageManager* Ogre::PageStrategy::mManager

protected inherited

Definition at line 77 of file OgrePageStrategy.h.

## mName

String Ogre::PageStrategy::mName

protected inherited

Definition at line 76 of file OgrePageStrategy.h.

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

- OgreGrid2DPageStrategy.h

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