Skip to content

Commit 50f3420

Browse files
ptitjanotroopa81
authored andcommittedMar 20, 2023
qgsterraingenerator: Use Qgs3DUtils
1 parent 0ee7b4c commit 50f3420

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎src/3d/terrain/qgsterraingenerator.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ QgsAABB QgsTerrainGenerator::rootChunkBbox( const Qgs3DMapSettings &map ) const
2626

2727
float hMin, hMax;
2828
rootChunkHeightRange( hMin, hMax );
29-
return QgsAABB( te.xMinimum() - map.origin().x(), hMin * map.terrainVerticalScale(), -te.yMaximum() + map.origin().y(),
30-
te.xMaximum() - map.origin().x(), hMax * map.terrainVerticalScale(), -te.yMinimum() + map.origin().y() );
29+
return Qgs3DUtils::mapToWorldExtent( te, hMin * map.terrainVerticalScale(), hMax * map.terrainVerticalScale(), map.origin() );
3130
}
3231

3332
float QgsTerrainGenerator::rootChunkError( const Qgs3DMapSettings &map ) const

0 commit comments

Comments
 (0)
Please sign in to comment.