aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-04-13 21:17:43 +0100
committerJustin Clark-Casey (justincc)2011-04-13 21:17:43 +0100
commit58efd761d13bd4f2617fcb3f94bbe265880589e3 (patch)
tree4900fbec5e577c48b42efeb10115fd64dc47681b /OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
parentfactor out some test code into the SetUp() (diff)
downloadopensim-SC_OLD-58efd761d13bd4f2617fcb3f94bbe265880589e3.zip
opensim-SC_OLD-58efd761d13bd4f2617fcb3f94bbe265880589e3.tar.gz
opensim-SC_OLD-58efd761d13bd4f2617fcb3f94bbe265880589e3.tar.bz2
opensim-SC_OLD-58efd761d13bd4f2617fcb3f94bbe265880589e3.tar.xz
Add coalesced scene objects class and serializer. This is currently only used by the TestRezCoalescedObject() regression test.
This structure matches the existing one for SceneObjects and will allow code to be reused by the uuid gatherer, other tests, etc. Test is not yet fully implemented due to a bug in rezzing coalesced objects where they all get the same name as the item. Only one object should get the same name as the item, which appears to be the one selected last when the the objects were coalesced in the first place. This bug will be addressed shortly.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs19
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 73b0a35..cfcfc79 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -274,7 +274,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
274 float minX, minY, minZ; 274 float minX, minY, minZ;
275 float maxX, maxY, maxZ; 275 float maxX, maxY, maxZ;
276 276
277 Vector3[] offsets = m_Scene.GetCombinedBoundingBox(objlist, 277 Vector3[] offsets = Scene.GetCombinedBoundingBox(objlist,
278 out minX, out maxX, out minY, out maxY, 278 out minX, out maxX, out minY, out maxY,
279 out minZ, out maxZ); 279 out minZ, out maxZ);
280 280
@@ -289,7 +289,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
289 XmlDocument doc = new XmlDocument(); 289 XmlDocument doc = new XmlDocument();
290 SceneObjectGroup g = objlist[i]; 290 SceneObjectGroup g = objlist[i];
291 doc.LoadXml(xmlStrings[g.UUID]); 291 doc.LoadXml(xmlStrings[g.UUID]);
292 XmlElement e = (XmlElement)doc.SelectSingleNode("/SceneObjectGroup"); 292 XmlElement e = (XmlElement)doc.SelectSingleNode("/SceneObjectGroup");
293 e.SetAttribute("offsetx", offsets[i].X.ToString()); 293 e.SetAttribute("offsetx", offsets[i].X.ToString());
294 e.SetAttribute("offsety", offsets[i].Y.ToString()); 294 e.SetAttribute("offsety", offsets[i].Y.ToString());
295 e.SetAttribute("offsetz", offsets[i].Z.ToString()); 295 e.SetAttribute("offsetz", offsets[i].Z.ToString());
@@ -659,9 +659,18 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
659 itemId, n.OuterXml); 659 itemId, n.OuterXml);
660 objlist.Add(g); 660 objlist.Add(g);
661 XmlElement el = (XmlElement)n; 661 XmlElement el = (XmlElement)n;
662 float x = Convert.ToSingle(el.GetAttribute("offsetx")); 662
663 float y = Convert.ToSingle(el.GetAttribute("offsety")); 663 string rawX = el.GetAttribute("offsetx");
664 float z = Convert.ToSingle(el.GetAttribute("offsetz")); 664 string rawY = el.GetAttribute("offsety");
665 string rawZ = el.GetAttribute("offsetz");
666//
667// m_log.DebugFormat(
668// "[INVENTORY ACCESS MODULE]: Converting coalesced object {0} offset <{1}, {2}, {3}>",
669// g.Name, rawX, rawY, rawZ);
670
671 float x = Convert.ToSingle(rawX);
672 float y = Convert.ToSingle(rawY);
673 float z = Convert.ToSingle(rawZ);
665 veclist.Add(new Vector3(x, y, z)); 674 veclist.Add(new Vector3(x, y, z));
666 } 675 }
667 } 676 }