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

Specialisation of PageStrategyData for Grid3DPageStrategy. More...

#include <OgreGrid3DPageStrategy.h>

+ Inheritance diagram for Ogre::Grid3DPageStrategyData:

Public Member Functions

 Grid3DPageStrategyData ()
 
 ~Grid3DPageStrategyData ()
 
void calculateCell (PageID inPageID, int32 *x, int32 *y, int32 *z)
 
PageID calculatePageID (int32 x, int32 y, int32 z)
 
void determineGridLocation (const Vector3 &gridpos, int32 *x, int32 *y, int32 *z)
 Convert a grid position into a row and column index. More...
 
virtual void getBottomLeftGridSpace (int32 x, int32 y, int z, Vector3 &bl)
 Get the (grid space) bottom-left of a cell. More...
 
virtual int32 getCellRangeMaxX () const
 get the index range of all cells (values outside this will be ignored) More...
 
virtual int32 getCellRangeMaxY () const
 get the index range of all cells (values outside this will be ignored) More...
 
virtual int32 getCellRangeMaxZ () const
 get the index range of all cells (values outside this will be ignored) More...
 
virtual int32 getCellRangeMinX () const
 get the index range of all cells (values outside this will be ignored) More...
 
virtual int32 getCellRangeMinY () const
 get the index range of all cells (values outside this will be ignored) More...
 
virtual int32 getCellRangeMinZ () const
 get the index range of all cells (values outside this will be ignored) More...
 
virtual Vector3 getCellSize () const
 Get the size of the cells in the grid. More...
 
virtual void getCornersGridSpace (int32 x, int32 y, int32 z, Vector3 *pEightPoints)
 Get the (grid space) corners of a cell. More...
 
virtual Real getHoldRadius () const
 Get the Holding radius. More...
 
virtual Real getLoadRadius () const
 Get the loading radius. More...
 
virtual void getMidPointGridSpace (int32 x, int32 y, int32 z, Vector3 &mid)
 
virtual const Vector3getOrigin (const Vector3 &worldOrigin)
 Get the origin of the grid in world space. More...
 
bool load (StreamSerialiser &stream)
 Load this data from a stream (returns true if successful) 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 save (StreamSerialiser &stream)
 Save this data to a stream. More...
 
virtual void setCellRange (int32 minX, int32 minY, int32 minZ, int32 maxX, int32 maxY, int32 maxZ)
 Set the index range of all cells (values outside this will be ignored) More...
 
virtual void setCellRangeMaxX (int32 maxX)
 Set the index range of all cells (values outside this will be ignored) More...
 
virtual void setCellRangeMaxY (int32 maxY)
 Set the index range of all cells (values outside this will be ignored) More...
 
virtual void setCellRangeMaxZ (int32 maxZ)
 get the index range of all cells (values outside this will be ignored) More...
 
virtual void setCellRangeMinX (int32 minX)
 Set the index range of all cells (values outside this will be ignored) More...
 
virtual void setCellRangeMinY (int32 minY)
 Set the index range of all cells (values outside this will be ignored) More...
 
virtual void setCellRangeMinZ (int32 minZ)
 Set the index range of all cells (values outside this will be ignored) More...
 
virtual void setCellSize (const Vector3 &sz)
 Set the size of the cells in the grid. More...
 
virtual void setHoldRadius (Real sz)
 Set the Holding radius. More...
 
virtual void setLoadRadius (Real sz)
 Set the loading radius. More...
 
virtual void setOrigin (const Vector3 &worldOrigin)
 Set the origin of the grid in world space. More...
 

Static Public Attributes

static const uint32 CHUNK_ID
 
static const uint16 CHUNK_VERSION
 

Detailed Description

Specialisation of PageStrategyData for Grid3DPageStrategy.

Remarks
Structurally this data defines with a 3D grid of pages, with the logical origin in the center of the entire grid. The grid cells are indexed from 0 as a 'centre' slot, supporting both positive and negative values. so (0,0,0) is the centre cell, (1,0,0) is the cell to the right of the centre, (0,0,1) is the cell in front of the centre, (0,1,0) the cell above the center, etc. The maximum extent of each axis is -512 to +511, so in other words enough for over 2 billion different entries.
To limit the page load requests that are generated to a fixed region, you can set the min and max cell indexes (inclusive)for each direction; if a page request would address a cell outside this range it is ignored so you don't have the expense of checking for page data that will never exist.
The data format for this in a file is:
Grid3DPageStrategyData (Identifier 'G3DD')
[Version 1]
Name Type Description
Grid origin Vector3 World origin of the grid.
Grid cell size Vector3 The size of each cell (page) in the grid
Grid cell range (minx, maxx, miny, maxy, minz, maxz) int16 * 6 The extents of the world in cell indexes
Load radius Real The outer radius at which new pages should start loading
Hold radius Real The radius at which existing pages should be held if already loaded but not actively loaded (should be larger than Load radius)
See also
Grid2DPageStrategyData

Constructor & Destructor Documentation

◆ Grid3DPageStrategyData()

Ogre::Grid3DPageStrategyData::Grid3DPageStrategyData ( )

◆ ~Grid3DPageStrategyData()

Ogre::Grid3DPageStrategyData::~Grid3DPageStrategyData ( )

Member Function Documentation

◆ calculateCell()

void Ogre::Grid3DPageStrategyData::calculateCell ( PageID  inPageID,
int32 x,
int32 y,
int32 z 
)

◆ calculatePageID()

PageID Ogre::Grid3DPageStrategyData::calculatePageID ( int32  x,
int32  y,
int32  z 
)

◆ determineGridLocation()

void Ogre::Grid3DPageStrategyData::determineGridLocation ( const Vector3 gridpos,
int32 x,
int32 y,
int32 z 
)

Convert a grid position into a row and column index.

◆ getBottomLeftGridSpace()

virtual void Ogre::Grid3DPageStrategyData::getBottomLeftGridSpace ( int32  x,
int32  y,
int  z,
Vector3 bl 
)
virtual

Get the (grid space) bottom-left of a cell.

◆ getCellRangeMaxX()

virtual int32 Ogre::Grid3DPageStrategyData::getCellRangeMaxX ( ) const
inlinevirtual

get the index range of all cells (values outside this will be ignored)

◆ getCellRangeMaxY()

virtual int32 Ogre::Grid3DPageStrategyData::getCellRangeMaxY ( ) const
inlinevirtual

get the index range of all cells (values outside this will be ignored)

◆ getCellRangeMaxZ()

virtual int32 Ogre::Grid3DPageStrategyData::getCellRangeMaxZ ( ) const
inlinevirtual

get the index range of all cells (values outside this will be ignored)

◆ getCellRangeMinX()

virtual int32 Ogre::Grid3DPageStrategyData::getCellRangeMinX ( ) const
inlinevirtual

get the index range of all cells (values outside this will be ignored)

◆ getCellRangeMinY()

virtual int32 Ogre::Grid3DPageStrategyData::getCellRangeMinY ( ) const
inlinevirtual

get the index range of all cells (values outside this will be ignored)

◆ getCellRangeMinZ()

virtual int32 Ogre::Grid3DPageStrategyData::getCellRangeMinZ ( ) const
inlinevirtual

get the index range of all cells (values outside this will be ignored)

◆ getCellSize()

virtual Vector3 Ogre::Grid3DPageStrategyData::getCellSize ( ) const
inlinevirtual

Get the size of the cells in the grid.

◆ getCornersGridSpace()

virtual void Ogre::Grid3DPageStrategyData::getCornersGridSpace ( int32  x,
int32  y,
int32  z,
Vector3 pEightPoints 
)
virtual

Get the (grid space) corners of a cell.

Remarks
Populates pEightPoints in anticlockwise order from the bottom left point.

◆ getHoldRadius()

virtual Real Ogre::Grid3DPageStrategyData::getHoldRadius ( ) const
inlinevirtual

Get the Holding radius.

◆ getLoadRadius()

virtual Real Ogre::Grid3DPageStrategyData::getLoadRadius ( ) const
inlinevirtual

Get the loading radius.

◆ getMidPointGridSpace()

virtual void Ogre::Grid3DPageStrategyData::getMidPointGridSpace ( int32  x,
int32  y,
int32  z,
Vector3 mid 
)
virtual

◆ getOrigin()

virtual const Vector3& Ogre::Grid3DPageStrategyData::getOrigin ( const Vector3 worldOrigin)
inlinevirtual

Get the origin of the grid in world space.

◆ load()

bool Ogre::Grid3DPageStrategyData::load ( StreamSerialiser stream)
virtual

Load this data from a stream (returns true if successful)

Implements Ogre::PageStrategyData.

◆ 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

◆ save()

void Ogre::Grid3DPageStrategyData::save ( StreamSerialiser stream)
virtual

Save this data to a stream.

Implements Ogre::PageStrategyData.

◆ setCellRange()

virtual void Ogre::Grid3DPageStrategyData::setCellRange ( int32  minX,
int32  minY,
int32  minZ,
int32  maxX,
int32  maxY,
int32  maxZ 
)
virtual

Set the index range of all cells (values outside this will be ignored)

◆ setCellRangeMaxX()

virtual void Ogre::Grid3DPageStrategyData::setCellRangeMaxX ( int32  maxX)
virtual

Set the index range of all cells (values outside this will be ignored)

◆ setCellRangeMaxY()

virtual void Ogre::Grid3DPageStrategyData::setCellRangeMaxY ( int32  maxY)
virtual

Set the index range of all cells (values outside this will be ignored)

◆ setCellRangeMaxZ()

virtual void Ogre::Grid3DPageStrategyData::setCellRangeMaxZ ( int32  maxZ)
virtual

get the index range of all cells (values outside this will be ignored)

◆ setCellRangeMinX()

virtual void Ogre::Grid3DPageStrategyData::setCellRangeMinX ( int32  minX)
virtual

Set the index range of all cells (values outside this will be ignored)

◆ setCellRangeMinY()

virtual void Ogre::Grid3DPageStrategyData::setCellRangeMinY ( int32  minY)
virtual

Set the index range of all cells (values outside this will be ignored)

◆ setCellRangeMinZ()

virtual void Ogre::Grid3DPageStrategyData::setCellRangeMinZ ( int32  minZ)
virtual

Set the index range of all cells (values outside this will be ignored)

◆ setCellSize()

virtual void Ogre::Grid3DPageStrategyData::setCellSize ( const Vector3 sz)
virtual

Set the size of the cells in the grid.

◆ setHoldRadius()

virtual void Ogre::Grid3DPageStrategyData::setHoldRadius ( Real  sz)
virtual

Set the Holding radius.

◆ setLoadRadius()

virtual void Ogre::Grid3DPageStrategyData::setLoadRadius ( Real  sz)
virtual

Set the loading radius.

◆ setOrigin()

virtual void Ogre::Grid3DPageStrategyData::setOrigin ( const Vector3 worldOrigin)
virtual

Set the origin of the grid in world space.

Member Data Documentation

◆ CHUNK_ID

const uint32 Ogre::Grid3DPageStrategyData::CHUNK_ID
static

◆ CHUNK_VERSION

const uint16 Ogre::Grid3DPageStrategyData::CHUNK_VERSION
static

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