28 using OpenSim.Region.Framework.Interfaces;
29 using OpenSim.Region.Framework.Scenes;
35 #region ITerrainPaintableEffect Members
38 double strength,
double duration,
int startX,
int endX,
int startY,
int endY)
40 strength = TerrainUtil.MetersToSphericalStrength(strength);
43 double[,] tweak =
new double[map.Width,map.Height];
45 double area = strength;
46 double step = strength / 4.0;
51 for (x = startX; x <= endX; x++)
53 for (y = startY; y <= endY; y++)
58 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
66 for (n = 0.0 - area; n < area; n += step)
69 for (l = 0.0 - area; l < area; l += step)
72 average += TerrainUtil.GetBilinearInterpolate(x + n, y + l, map);
75 tweak[x, y] = average / avgsteps;
80 for (x = startX; x <= endX; x++)
82 for (y = startY; y <= endY; y++)
87 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
92 double a = (map[x, y] - tweak[x, y]) * da;
93 double newz = map[x, y] - (a * duration);
void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, double strength, double duration, int startX, int endX, int startY, int endY)