diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Util.cs | 19 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 10 |
2 files changed, 27 insertions, 2 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index e5ff27a..039b926 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -324,10 +324,25 @@ namespace OpenSim.Framework | |||
324 | } | 324 | } |
325 | 325 | ||
326 | /// <summary> | 326 | /// <summary> |
327 | /// Debug utility function to convert OSD into formatted XML for debugging purposes. | ||
328 | /// </summary> | ||
329 | /// <param name="osd"> | ||
330 | /// A <see cref="OSD"/> | ||
331 | /// </param> | ||
332 | /// <returns> | ||
333 | /// A <see cref="System.String"/> | ||
334 | /// </returns> | ||
335 | public static string GetFormattedXml(OSD osd) | ||
336 | { | ||
337 | return GetFormattedXml(OSDParser.SerializeLLSDXmlString(osd)); | ||
338 | } | ||
339 | |||
340 | /// <summary> | ||
327 | /// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes. | 341 | /// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes. |
328 | /// | ||
329 | /// Please don't delete me even if I appear currently unused! | ||
330 | /// </summary> | 342 | /// </summary> |
343 | /// <remarks> | ||
344 | /// Please don't delete me even if I appear currently unused! | ||
345 | /// </remarks> | ||
331 | /// <param name="rawXml"></param> | 346 | /// <param name="rawXml"></param> |
332 | /// <returns></returns> | 347 | /// <returns></returns> |
333 | public static string GetFormattedXml(string rawXml) | 348 | public static string GetFormattedXml(string rawXml) |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index be4ee41..38b9112 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -366,6 +366,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
366 | // physics_shape is an array of OSDMaps, one for each submesh | 366 | // physics_shape is an array of OSDMaps, one for each submesh |
367 | if (decodedMeshOsd is OSDArray) | 367 | if (decodedMeshOsd is OSDArray) |
368 | { | 368 | { |
369 | // Console.WriteLine("decodedMeshOsd for {0} - {1}", primName, Util.GetFormattedXml(decodedMeshOsd)); | ||
370 | |||
369 | decodedMeshOsdArray = (OSDArray)decodedMeshOsd; | 371 | decodedMeshOsdArray = (OSDArray)decodedMeshOsd; |
370 | foreach (OSD subMeshOsd in decodedMeshOsdArray) | 372 | foreach (OSD subMeshOsd in decodedMeshOsdArray) |
371 | { | 373 | { |
@@ -373,6 +375,14 @@ namespace OpenSim.Region.Physics.Meshing | |||
373 | { | 375 | { |
374 | OSDMap subMeshMap = (OSDMap)subMeshOsd; | 376 | OSDMap subMeshMap = (OSDMap)subMeshOsd; |
375 | 377 | ||
378 | // Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap)); | ||
379 | |||
380 | // As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level | ||
381 | // of Detail Blocks (maps) contain just a NoGeometry key to signal there is no | ||
382 | // geometry for this submesh. | ||
383 | if (subMeshMap.ContainsKey("NoGeometry") && ((OSDBoolean)subMeshMap["NoGeometry"])) | ||
384 | continue; | ||
385 | |||
376 | OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshMap["PositionDomain"])["Max"].AsVector3(); | 386 | OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshMap["PositionDomain"])["Max"].AsVector3(); |
377 | OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshMap["PositionDomain"])["Min"].AsVector3(); | 387 | OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshMap["PositionDomain"])["Min"].AsVector3(); |
378 | ushort faceIndexOffset = (ushort)coords.Count; | 388 | ushort faceIndexOffset = (ushort)coords.Count; |