Below is a patch for the smooth tool. 

I factored out the essential computations and placed it in a 
channel method to work similar to raise and lower. 
It now performs about the same rate as raise and lower.
This commit is contained in:
Sean Dague
2008-02-29 20:36:14 +00:00
parent 6d774339d9
commit c009e2e095
2 changed files with 65 additions and 9 deletions

View File

@@ -251,7 +251,6 @@ namespace OpenSim.Region.Terrain
//SmoothTerrain(y, x , size, (double)seconds / 5.0);
//}
//}
SmoothTerrain(west, north, size, (double) seconds/5.0);
break;
@@ -1331,14 +1330,9 @@ namespace OpenSim.Region.Terrain
{
lock (heightmap)
{
Channel smoothed = heightmap.Copy();
smoothed.Smooth(amount);
Channel mask = new Channel();
mask.Raise(rx, ry, size, amount);
heightmap.Blend(smoothed, mask);
}
// perform essential computation as a channel method
heightmap.SmoothRegion(rx, ry, size, amount);
}
tainted++;
}