LCOV - code coverage report
Current view: top level - maps/random/rmgen/painter - ElevationBlendingPainter.js (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 5 20.0 %
Date: 2023-04-02 12:52:40 Functions: 0 2 0.0 %

          Line data    Source code
       1             : /**
       2             :  * The ElevationBlendingPainter sets the elevation of each point of the given area to the weighted targetHeight.
       3             :  */
       4             : function ElevationBlendingPainter(targetHeight, strength)
       5             : {
       6           0 :         this.targetHeight = targetHeight;
       7           0 :         this.strength = strength;
       8             : }
       9             : 
      10           6 : ElevationBlendingPainter.prototype.paint = function(area)
      11             : {
      12           0 :         for (let point of area.getPoints())
      13           0 :                 g_Map.setHeight(point, this.strength * this.targetHeight + (1 - this.strength) * g_Map.getHeight(point));
      14             : };

Generated by: LCOV version 1.14