OGRE  2.2.4
Object-Oriented Graphics Rendering Engine
Ogre::Grid3DPageStrategy Class Reference

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

#include <OgreGrid3DPageStrategy.h>

+ Inheritance diagram for Ogre::Grid3DPageStrategy:

Public Member Functions

 Grid3DPageStrategy (PageManager *manager)
 
 ~Grid3DPageStrategy ()
 
PageStrategyDatacreateData ()
 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...
 
PageManagergetManager () const
 
const StringgetName () 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...
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ Grid3DPageStrategy()

Ogre::Grid3DPageStrategy::Grid3DPageStrategy ( PageManager manager)

◆ ~Grid3DPageStrategy()

Ogre::Grid3DPageStrategy::~Grid3DPageStrategy ( )

Member Function Documentation

◆ createData()

PageStrategyData* Ogre::Grid3DPageStrategy::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::Grid3DPageStrategy::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 
)
inlinevirtualinherited

Called when the frame ends.

◆ frameStart()

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

Called when the frame starts.

◆ getManager()

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

◆ getName()

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

◆ getPageID()

PageID Ogre::Grid3DPageStrategy::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::Grid3DPageStrategy::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
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 from Ogre::PageStrategy.

◆ 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()

void Ogre::Grid3DPageStrategy::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.


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