OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ogre::TerrainZonePage Class Reference

Groups a number of TerrainZoneRenderables (tiles) into a page, which is the unit of loading / unloading. More...

#include <OgreTerrainZonePage.h>

+ Inheritance diagram for Ogre::TerrainZonePage:
+ Collaboration diagram for Ogre::TerrainZonePage:

Public Types

typedef vector< TerrainZoneRow >
::type 
TerrainZone2D
 
typedef vector
< TerrainZoneRenderable * >
::type 
TerrainZoneRow
 

Public Member Functions

 TerrainZonePage (unsigned short numTiles)
 The main constructor. More...
 
virtual ~TerrainZonePage ()
 Destructor, will organise the deletion of pages. More...
 
TerrainZoneRenderablegetTerrainZoneTile (const Vector3 &pt)
 Returns the TerrainZoneRenderable that contains the given pt. More...
 
TerrainZoneRenderablegetTerrainZoneTile (unsigned short x, unsigned short z)
 Returns the TerrainZoneRenderable Tile with given index. More...
 
void linkNeighbours (void)
 After TerrainZoneRenderables have been populated, this method adds the neighbour links. 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 setRenderQueue (uint8 qid)
 Sets the render queue group which the tiles should be rendered in. More...
 

Public Attributes

SceneNodepageSceneNode
 The scene node to which all the tiles for this page are attached. More...
 
TerrainZone2D tiles
 2-dimensional vector of tiles, pre-allocated to the correct size More...
 
unsigned short tilesPerPage
 The number of tiles across a page. More...
 

Detailed Description

Groups a number of TerrainZoneRenderables (tiles) into a page, which is the unit of loading / unloading.

Remarks
Note that this class, whilst holding onto TerrainZoneRenderable instances, does not actually process or initialise them itself - this is intentional so the TerrainZonePageSource which is providing the tiles is able to load and prepare each renderable incrementally if required, thus avoiding any 'single hit' load methods for the page.
All this class does do is pre-create a 2D vector of 'slots' in which to place the TerrainZoneRenderable pointers, which it does on construction. Note that this structure is public to allow completely free access to users of this class.

Definition at line 59 of file OgreTerrainZonePage.h.

Member Typedef Documentation

Constructor & Destructor Documentation

Ogre::TerrainZonePage::TerrainZonePage ( unsigned short  numTiles)

The main constructor.

Parameters
numTilesThe number of terrain tiles (TerrainZoneRenderable) across (and down) a page
virtual Ogre::TerrainZonePage::~TerrainZonePage ( )
virtual

Destructor, will organise the deletion of pages.

Member Function Documentation

TerrainZoneRenderable* Ogre::TerrainZonePage::getTerrainZoneTile ( const Vector3 pt)

Returns the TerrainZoneRenderable that contains the given pt.

If no tile exists at the point, it returns 0;

TerrainZoneRenderable* Ogre::TerrainZonePage::getTerrainZoneTile ( unsigned short  x,
unsigned short  z 
)
inline

Returns the TerrainZoneRenderable Tile with given index.

Definition at line 95 of file OgreTerrainZonePage.h.

void Ogre::TerrainZonePage::linkNeighbours ( void  )

After TerrainZoneRenderables have been populated, this method adds the neighbour links.

Remarks
Should be called before adding the page to the scene manager.
template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 95 of file OgreMemoryAllocatedObject.h.

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

Definition at line 101 of file OgreMemoryAllocatedObject.h.

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

Definition at line 107 of file OgreMemoryAllocatedObject.h.

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

Definition at line 112 of file OgreMemoryAllocatedObject.h.

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

Definition at line 118 of file OgreMemoryAllocatedObject.h.

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

Definition at line 67 of file OgreMemoryAllocatedObject.h.

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

Definition at line 72 of file OgreMemoryAllocatedObject.h.

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

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

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

Definition at line 85 of file OgreMemoryAllocatedObject.h.

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

Definition at line 90 of file OgreMemoryAllocatedObject.h.

void Ogre::TerrainZonePage::setRenderQueue ( uint8  qid)

Sets the render queue group which the tiles should be rendered in.

Member Data Documentation

SceneNode* Ogre::TerrainZonePage::pageSceneNode

The scene node to which all the tiles for this page are attached.

Definition at line 70 of file OgreTerrainZonePage.h.

TerrainZone2D Ogre::TerrainZonePage::tiles

2-dimensional vector of tiles, pre-allocated to the correct size

Definition at line 66 of file OgreTerrainZonePage.h.

unsigned short Ogre::TerrainZonePage::tilesPerPage

The number of tiles across a page.

Definition at line 68 of file OgreTerrainZonePage.h.


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