EMODnet Quantized Mesh Generator for Cesium
Classes | Public Member Functions | List of all members
QuantizedMeshTiler Class Reference

Tiler of a terrain generating quantized-mesh tiles. More...

#include <quantized_mesh_tiler.h>

Inheritance diagram for QuantizedMeshTiler:

Classes

struct  QMTOptions
 

Public Member Functions

 QuantizedMeshTiler (GDALDataset *dataset, const ctb::Grid &grid, const ctb::TilerOptions &tilerOptions, const QMTOptions &options, const TinCreation::TinCreator &tinCreator)
 Constructor: instantiates a tiler with all required arguments.
 
 QuantizedMeshTiler (const QuantizedMeshTiler &tiler)
 A copy constructor that does not try to copy the mutex (needed because mutex are non-copyable)
 
QuantizedMeshTile createTile (const ctb::TileCoordinate &coord, BordersData &bd)
 Create the quantized mesh tile. More...
 
QMTOptions getOptions ()
 Get the creation options for this tiler (QMTOptions structure) More...
 
void setTinCreatorParamsForZoom (const unsigned int &zoom)
 
std::vector< Point_3 > getUVHPointsFromRaster (const ctb::TileCoordinate &coord, BordersData &bd, float &minHeight, float &maxHeight, ctb::CRSBounds &tileBounds) const
 Get the heightmap values from the GDAL raster in normalized coordinates. More...
 

Detailed Description

Tiler of a terrain generating quantized-mesh tiles.

Member Function Documentation

◆ createTile()

QuantizedMeshTile QuantizedMeshTiler::createTile ( const ctb::TileCoordinate &  coord,
BordersData bd 
)

Create the quantized mesh tile.

Create the quantized-mesh tile given the raster enclosed by the coordinates coord and the vertices to maintain from previous tiles The original full resolution regular grid extracted from the rasters is decimated to obrain a Triangulated Irregular Network (TIN)

Note: the parameters tileEastVertices and tileNorthVertices represent the vertices to maintain from the neighboring tiles on input, but after the function they are output parameters containing the eastern/northen vertices to maintain for the CURRENT tile Take into account that their 3D coordinates represent (u,v), in tile coordinates [0..QuantizedMesh::MAX_VERTEX_DATA], and height, where this height is the raster-extracted height in meters.

Parameters
coordTileCoordinate.
bdData to preserve for the borders.
Returns
The quantized mesh tile.

◆ getOptions()

QMTOptions QuantizedMeshTiler::getOptions ( )
inline

Get the creation options for this tiler (QMTOptions structure)

Returns
QMTOptions structure

◆ getUVHPointsFromRaster()

std::vector< TinCreation::Point_3 > QuantizedMeshTiler::getUVHPointsFromRaster ( const ctb::TileCoordinate &  coord,
BordersData bd,
float &  minHeight,
float &  maxHeight,
ctb::CRSBounds &  tileBounds 
) const

Get the heightmap values from the GDAL raster in normalized coordinates.

Parameters
coordThe coordinates of the tile
bdData falling in the borders of the tile. Note: this is not const because border vertices are input as tile coordinates, but are output in uvh coordinates
[out]minHeightMin height on the tile from raster
[out]maxHeightMax height on the tile from raster
[out]tileBoundsOutput variable containing the tile bounds
Returns
Vector of points in the heightmap

◆ setTinCreatorParamsForZoom()

void QuantizedMeshTiler::setTinCreatorParamsForZoom ( const unsigned int &  zoom)
inline

Sets the TIN creator parameter related with the current zoom level.

Parameters
zoomThe zoom level

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