PagedGeometry
1.3.0
|
Useful page information supplied to a pageloader. More...
#include <PagedGeometry.h>
Public Attributes | |
TBounds | bounds |
The page boundaries in which all entities should be placed. More... | |
Ogre::Vector3 | centerPoint |
The center of the page (simply the middle of the bounds). More... | |
int | xIndex |
The X index of the page tile. More... | |
int | zIndex |
The Z index of the page tile. More... | |
void * | userData |
Misc. More... | |
std::vector< Ogre::Mesh * > | meshList |
Useful page information supplied to a pageloader.
When your page loader's loadPage() or unloadPage() is called, you are supplied with a PageInfo variable. This basically tells you what region in space is to be loaded into the page, in addition to some other useful information about that region.
TBounds Forests::PageInfo::bounds |
The page boundaries in which all entities should be placed.
This specifies the rectangular boundary of the page. Every entity contained in the page should reside within these boundaries.
Referenced by Forests::GrassLoader::loadPage(), Forests::TreeLoader2D::loadPage(), and Forests::TreeLoader3D::loadPage().
Ogre::Vector3 Forests::PageInfo::centerPoint |
The center of the page (simply the middle of the bounds).
Referenced by Forests::GrassLoader::loadPage().
int Forests::PageInfo::xIndex |
The X index of the page tile.
If all the geometry pages were arranged in a big 2D grid, this would be the X index of this page in that grid.
This is mathematically equivalent to Math::Floor( bounds.left / bounds.width() ), although this should be used instead due to floating point precision issues which may occur otherwise.
Referenced by Forests::TreeLoader2D::loadPage(), and Forests::TreeLoader3D::loadPage().
int Forests::PageInfo::zIndex |
The Z index of the page tile.
If all the geometry pages were arranged in a big 2D grid, this would be the Z index of this page in that grid.
This is mathematically equivalent to Math::Floor( bounds.top / bounds.height() ), although this should be used instead due to floating point precision issues which may occur otherwise.
Referenced by Forests::TreeLoader2D::loadPage(), and Forests::TreeLoader3D::loadPage().
void* Forests::PageInfo::userData |
Misc.
custom data to associate with this page tile.
This field can be set in PageLoader::loadPage() to point to custom data allocated during the loading of a page. You can later retreive this data in PageLoader::unloadPage() in order to deallocate the data if desired.