cesium-native  0.41.0
CesiumGeometry::OctreeTilingScheme Class Reference

Defines how an AxisAlignedBox is divided into octree tiles. More...

#include <CesiumGeometry/OctreeTilingScheme.h>

Public Member Functions

 OctreeTilingScheme (const AxisAlignedBox &box, uint32_t rootTilesX, uint32_t rootTilesY, uint32_t rootTilesZ) noexcept
 Constructs a new instance. More...
 
const AxisAlignedBoxgetBox () const noexcept
 Return the overall box that is tiled.
 
uint32_t getRootTilesX () const noexcept
 Returns the number of root tiles, in x-direction.
 
uint32_t getRootTilesY () const noexcept
 Returns the number of root tiles, in y-direction.
 
uint32_t getRootTilesZ () const noexcept
 Returns the number of root tiles, in z-direction.
 
uint32_t getNumberOfXTilesAtLevel (uint32_t level) const noexcept
 Returns the number of tiles, in x-direction, at the given level.
 
uint32_t getNumberOfYTilesAtLevel (uint32_t level) const noexcept
 Returns the number of tiles, in y-direction, at the given level.
 
uint32_t getNumberOfZTilesAtLevel (uint32_t level) const noexcept
 Returns the number of tiles, in z-direction, at the given level.
 
std::optional< CesiumGeometry::OctreeTileIDpositionToTile (const glm::dvec3 &position, uint32_t level) const noexcept
 Computes the CesiumGeometry::OctreeTileID for a given position and level. More...
 
AxisAlignedBox tileToBox (const CesiumGeometry::OctreeTileID &tileID) const noexcept
 Returns the AxisAlignedBox that is covered by the specified tile. More...
 

Detailed Description

Defines how an AxisAlignedBox is divided into octree tiles.

Definition at line 17 of file OctreeTilingScheme.h.

Constructor & Destructor Documentation

◆ OctreeTilingScheme()

CesiumGeometry::OctreeTilingScheme::OctreeTilingScheme ( const AxisAlignedBox box,
uint32_t  rootTilesX,
uint32_t  rootTilesY,
uint32_t  rootTilesZ 
)
noexcept

Constructs a new instance.

Parameters
boxThe overall box that is tiled, expressed in projected coordinates.
rootTilesXThe number of tiles at the root of the quadtree in the X direction.
rootTilesYThe nubmer of tiles at the root of the quadtree in the Y direction.
rootTilesZThe number of tiles at the root of the quadtree in the Z direction.

Member Function Documentation

◆ positionToTile()

std::optional<CesiumGeometry::OctreeTileID> CesiumGeometry::OctreeTilingScheme::positionToTile ( const glm::dvec3 &  position,
uint32_t  level 
) const
noexcept

Computes the CesiumGeometry::OctreeTileID for a given position and level.

If the projected position is within the getBox of this tiling scheme, then this will compute the octree tile ID for the tile that contains the given position at the given level. Otherwise, nullopt is returned.

Parameters
positionThe position in projected coordinates.
levelThe level
Returns
The tile ID, or nullopt.

◆ tileToBox()

AxisAlignedBox CesiumGeometry::OctreeTilingScheme::tileToBox ( const CesiumGeometry::OctreeTileID tileID) const
noexcept

Returns the AxisAlignedBox that is covered by the specified tile.

The volume that is covered by the tile that is identified with the given CesiumGeometry::OctreeTileID will be computed, based on the getBox of this tiling scheme.

Parameters
tileIDThe tile ID
Returns
The box

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