Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Data Fields
Forests::PageInfo Struct Reference

Description

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.

See also
the PageLoader::loadPage() and PageLoader::unloadPage() documentation for more information.

Definition at line 898 of file PagedGeometry.h.

Data Fields

TBounds bounds
 
Ogre::Vector3 centerPoint
 
int xIndex
 
int zIndex
 
std::vector< Ogre::Mesh * > meshList
 

Field Documentation

◆ bounds

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.

  • bounds.left is the minimum X coordinate allowed for any entity in the page.
  • bounds.right is the maximum X coordinate allowed for any entity in the page.
  • bounds.top is the minimum Z coordinate allowed for any entity in the page.
  • bounds.bottom is the maximum Z coordinate allowed for any entity in the page.

Definition at line 913 of file PagedGeometry.h.

◆ centerPoint

Ogre::Vector3 Forests::PageInfo::centerPoint

The center of the page (simply the middle of the bounds).

Note
Since there is no way of knowing the elevation of your entities, centerPoint.y will always be defaulted at 0.

Definition at line 920 of file PagedGeometry.h.

◆ meshList

std::vector<Ogre::Mesh*> Forests::PageInfo::meshList

Definition at line 946 of file PagedGeometry.h.

◆ xIndex

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.

Definition at line 932 of file PagedGeometry.h.

◆ zIndex

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.

Definition at line 944 of file PagedGeometry.h.


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