17#include "moc_qgsterraingenerator.cpp"
61 return QStringLiteral(
"flat" );
63 return QStringLiteral(
"dem" );
65 return QStringLiteral(
"online" );
67 return QStringLiteral(
"mesh" );
69 return QStringLiteral(
"quantizedmesh" );
const QgsAbstractTerrainSettings * terrainSettings() const
Returns the terrain settings.
QgsCoordinateReferenceSystem crs() const
Returns coordinate reference system used in the 3D scene.
QgsCoordinateTransformContext transformContext() const
Returns the coordinate transform context, which stores various information regarding which datum tran...
static QgsRectangle tryReprojectExtent2D(const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs1, const QgsCoordinateReferenceSystem &crs2, const QgsCoordinateTransformContext &context)
Reprojects extent from crs1 to crs2 coordinate reference system with context context.
int mapTileResolution() const
Returns the resolution (in pixels) of the texture of a terrain tile.
double verticalScale() const
Returns the vertical scale (exaggeration) for terrain.
A 3-dimensional box composed of x, y, z coordinates.
This class represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
A rectangle specified with double values.
Type
Enumeration of the available terrain generators.
@ QuantizedMesh
Terrain is built from quantized mesh tiles.
@ Dem
Terrain is built from raster layer with digital elevation model.
@ Online
Terrain is built from downloaded tiles with digital elevation model.
@ Mesh
Terrain is built from mesh layer with z value on vertices.
@ Flat
The whole terrain is flat area.
virtual Type type() const =0
What texture generator implementation is this.
virtual QgsBox3D rootChunkBox3D(const Qgs3DMapSettings &map) const
Returns 3D box (in map coordinates) of the root chunk.
virtual float rootChunkError(const Qgs3DMapSettings &map) const
Returns error of the root chunk in world coordinates.
static QString typeToString(Type type)
Converts terrain generator type enumeration into a string.
virtual QgsRectangle rootChunkExtent() const =0
extent of the terrain's root chunk in terrain's CRS
virtual void rootChunkHeightRange(float &hMin, float &hMax) const
Returns height range of the root chunk in world coordinates.
virtual float heightAt(double x, double y, const Qgs3DRenderContext &context) const
Returns height at (x,y) in map's CRS.
virtual QgsCoordinateReferenceSystem crs() const
Returns CRS of the terrain.
bool isValid() const
Returns whether the terrain generator is valid.
virtual void setCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets the CRS associated with the terrain.