diff options
author | Adam Frisby | 2008-02-26 14:51:13 +0000 |
---|---|---|
committer | Adam Frisby | 2008-02-26 14:51:13 +0000 |
commit | eae7be1e36733580f67da742403147701f8a8d08 (patch) | |
tree | 4d47b6673fe246b96f8f34bb3a4e74ef2649a35f /OpenSim/Region/Environment/Modules/Terrain/FloodBrushes | |
parent | * Another slight tweak to the Voice Chat engine - crash caused by switching t... (diff) | |
download | opensim-SC-eae7be1e36733580f67da742403147701f8a8d08.zip opensim-SC-eae7be1e36733580f67da742403147701f8a8d08.tar.gz opensim-SC-eae7be1e36733580f67da742403147701f8a8d08.tar.bz2 opensim-SC-eae7be1e36733580f67da742403147701f8a8d08.tar.xz |
* Reimplementing Terrain as Region Modules
* New method involves interfaces for
** Terrain Paint Brushes (ie raise brush, lower brush, etc)
** Terrain Flood Brushes (ie raise area, lower area, etc)
** Terrain Effects (ie erosion, etc) [= W.I.P, not committed]
* Provided sample implementation for Raise Paint and Raise Area brushes.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Terrain/FloodBrushes')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/RaiseArea.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/RaiseArea.cs b/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/RaiseArea.cs new file mode 100644 index 0000000..ce83a4c --- /dev/null +++ b/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/RaiseArea.cs | |||
@@ -0,0 +1,30 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.Region.Environment.Modules.Terrain; | ||
5 | using OpenSim.Region.Environment.Interfaces; | ||
6 | |||
7 | namespace OpenSim.Region.Environment.Modules.Terrain.FloodBrushes | ||
8 | { | ||
9 | class RaiseArea : ITerrainFloodEffect | ||
10 | { | ||
11 | #region ITerrainFloodEffect Members | ||
12 | |||
13 | public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength) | ||
14 | { | ||
15 | int x, y; | ||
16 | for (x = 0; x < map.Width; x++) | ||
17 | { | ||
18 | for (y = 0; y < map.Height; y++) | ||
19 | { | ||
20 | if (fillArea[x, y] == true) | ||
21 | { | ||
22 | map[x, y] += strength; | ||
23 | } | ||
24 | } | ||
25 | } | ||
26 | } | ||
27 | |||
28 | #endregion | ||
29 | } | ||
30 | } | ||