28 element.setAttribute( QStringLiteral(
"exaggeration" ), mTerrainVerticalScale );
29 element.setAttribute( QStringLiteral(
"texture-size" ), mMapTileResolution );
30 element.setAttribute( QStringLiteral(
"max-terrain-error" ), mMaxTerrainScreenError );
31 element.setAttribute( QStringLiteral(
"max-ground-error" ), mMaxTerrainGroundError );
32 element.setAttribute( QStringLiteral(
"elevation-offset" ), mTerrainElevationOffset );
37 mTerrainVerticalScale = element.attribute( QStringLiteral(
"exaggeration" ), QStringLiteral(
"1" ) ).toDouble();
38 mMapTileResolution = element.attribute( QStringLiteral(
"texture-size" ), QStringLiteral(
"512" ) ).toInt();
39 mMaxTerrainScreenError = element.attribute( QStringLiteral(
"max-terrain-error" ), QStringLiteral(
"3" ) ).toDouble();
40 mMaxTerrainGroundError = element.attribute( QStringLiteral(
"max-ground-error" ), QStringLiteral(
"1" ) ).toDouble();
41 mTerrainElevationOffset = element.attribute( QStringLiteral(
"elevation-offset" ), QStringLiteral(
"0.0" ) ).toDouble();
The class is used as a container of context for various read/write operations on other objects.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)