Add a new Terrain brush action: Smooth Slope.

This smoothes the terrain using a linear regression algorithm.  Exists alongside the oldstyle height averaging action -- options are good!
This commit is contained in:
thecelloman 2013-04-10 08:44:22 -04:00
parent 1ed1a41256
commit 8eb0e98f86
8 changed files with 125 additions and 23 deletions

View file

@ -269,7 +269,7 @@ inline F32 fixedToFloat( U16 val )
/// Conversion from floating point to 11.5 fixed point.
inline U16 floatToFixed( F32 val )
{
return U16(val * 32.0);
return U16(val * 32.0 + 0.5f);
}
inline bool TerrainFile::isPointInTerrain( U32 x, U32 y ) const