aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-04-06 17:19:31 +0100
committerJustin Clark-Casey (justincc)2011-04-06 17:19:31 +0100
commitfa202a05e914395d5a1facf8bdadb6a553516bfe (patch)
tree1d503ddd49aa4723b85ecd06d79ef98819252617 /OpenSim/Region/CoreModules/World
parentChange some text to make the autoreturn mechanism more obvious, and align wit... (diff)
downloadopensim-SC_OLD-fa202a05e914395d5a1facf8bdadb6a553516bfe.zip
opensim-SC_OLD-fa202a05e914395d5a1facf8bdadb6a553516bfe.tar.gz
opensim-SC_OLD-fa202a05e914395d5a1facf8bdadb6a553516bfe.tar.bz2
opensim-SC_OLD-fa202a05e914395d5a1facf8bdadb6a553516bfe.tar.xz
Add method doc to some land bitmap methods in ILandObject.
Also changes prim count tests to use the correct upper region bounds, though the method actually ignores the overage.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs14
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs52
2 files changed, 48 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index c4fb11e..c2f104e 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -701,23 +701,11 @@ namespace OpenSim.Region.CoreModules.World.Land
701 return LandBitmap; 701 return LandBitmap;
702 } 702 }
703 703
704 /// <summary>
705 /// Full sim land object creation
706 /// </summary>
707 /// <returns></returns>
708 public bool[,] BasicFullRegionLandBitmap() 704 public bool[,] BasicFullRegionLandBitmap()
709 { 705 {
710 return GetSquareLandBitmap(0, 0, (int) Constants.RegionSize, (int) Constants.RegionSize); 706 return GetSquareLandBitmap(0, 0, (int) Constants.RegionSize, (int) Constants.RegionSize);
711 } 707 }
712 708
713 /// <summary>
714 /// Used to modify the bitmap between the x and y points. Points use 64 scale
715 /// </summary>
716 /// <param name="start_x"></param>
717 /// <param name="start_y"></param>
718 /// <param name="end_x"></param>
719 /// <param name="end_y"></param>
720 /// <returns></returns>
721 public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y) 709 public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y)
722 { 710 {
723 bool[,] tempBitmap = new bool[64,64]; 711 bool[,] tempBitmap = new bool[64,64];
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index f006db2..4acba18 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -49,6 +49,10 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
49 protected UUID m_otherUserId = new UUID("99999999-9999-9999-9999-999999999999"); 49 protected UUID m_otherUserId = new UUID("99999999-9999-9999-9999-999999999999");
50 protected TestScene m_scene; 50 protected TestScene m_scene;
51 protected PrimCountModule m_pcm; 51 protected PrimCountModule m_pcm;
52
53 /// <summary>
54 /// A parcel that covers the entire sim.
55 /// </summary>
52 protected ILandObject m_lo; 56 protected ILandObject m_lo;
53 57
54 [SetUp] 58 [SetUp]
@@ -60,9 +64,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
60 SceneSetupHelpers.SetupSceneModules(m_scene, lmm, m_pcm); 64 SceneSetupHelpers.SetupSceneModules(m_scene, lmm, m_pcm);
61 65
62 ILandObject lo = new LandObject(m_userId, false, m_scene); 66 ILandObject lo = new LandObject(m_userId, false, m_scene);
63 lo.SetLandBitmap(lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 67 lo.SetLandBitmap(
64 m_lo = lmm.AddLandObject(lo); 68 lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize / 4 - 1, (int)Constants.RegionSize / 4 - 1));
65 //scene.loadAllLandObjectsFromStorage(scene.RegionInfo.originRegionID); 69 m_lo = lmm.AddLandObject(lo);
66 } 70 }
67 71
68 /// <summary> 72 /// <summary>
@@ -124,7 +128,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
124 /// Test count after a parcel owner owned copied object is added. 128 /// Test count after a parcel owner owned copied object is added.
125 /// </summary> 129 /// </summary>
126 [Test] 130 [Test]
127 public void TestCopiedOwnerObject() 131 public void TestCopyOwnerObject()
128 { 132 {
129 TestHelper.InMethod(); 133 TestHelper.InMethod();
130// log4net.Config.XmlConfigurator.Configure(); 134// log4net.Config.XmlConfigurator.Configure();
@@ -143,7 +147,45 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
143 Assert.That(pc.Users[m_userId], Is.EqualTo(6)); 147 Assert.That(pc.Users[m_userId], Is.EqualTo(6));
144 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 148 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
145 Assert.That(pc.Simulator, Is.EqualTo(6)); 149 Assert.That(pc.Simulator, Is.EqualTo(6));
146 } 150 }
151
152 /// <summary>
153 /// Test that parcel counts update correctly when an object is moved between parcels, where that movement
154 /// is not done directly by the user/
155 /// </summary>
156 //[Test]
157 public void TestMoveOwnerObject()
158 {
159// TestHelper.InMethod();
160//// log4net.Config.XmlConfigurator.Configure();
161//
162// IPrimCounts pc = m_lo.PrimCounts;
163//
164// SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01);
165// m_scene.AddNewSceneObject(sog, false);
166//
167// Assert.That(pc.Owner, Is.EqualTo(3));
168// Assert.That(pc.Group, Is.EqualTo(0));
169// Assert.That(pc.Others, Is.EqualTo(0));
170// Assert.That(pc.Total, Is.EqualTo(3));
171// Assert.That(pc.Selected, Is.EqualTo(0));
172// Assert.That(pc.Users[m_userId], Is.EqualTo(3));
173// Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
174// Assert.That(pc.Simulator, Is.EqualTo(3));
175//
176// // Add a second object and retest
177// SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, 0x10);
178// m_scene.AddNewSceneObject(sog2, false);
179//
180// Assert.That(pc.Owner, Is.EqualTo(5));
181// Assert.That(pc.Group, Is.EqualTo(0));
182// Assert.That(pc.Others, Is.EqualTo(0));
183// Assert.That(pc.Total, Is.EqualTo(5));
184// Assert.That(pc.Selected, Is.EqualTo(0));
185// Assert.That(pc.Users[m_userId], Is.EqualTo(5));
186// Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
187// Assert.That(pc.Simulator, Is.EqualTo(5));
188 }
147 189
148 /// <summary> 190 /// <summary>
149 /// Test count after a parcel owner owned object is removed. 191 /// Test count after a parcel owner owned object is removed.