diff options
author | Master ScienceSim | 2010-10-28 09:09:42 -0700 |
---|---|---|
committer | Master ScienceSim | 2010-10-28 09:09:42 -0700 |
commit | f2c1d0e34feba801ff85c35ee049ed6d3067bb0d (patch) | |
tree | ff692ecc0db2b9cdf4cacd5a42234a5bb58ddd34 /OpenSim/Region/Physics | |
parent | Added background thread to handle delayed send and save of appearance (diff) | |
parent | Formatting cleanup. (diff) | |
download | opensim-SC_OLD-f2c1d0e34feba801ff85c35ee049ed6d3067bb0d.zip opensim-SC_OLD-f2c1d0e34feba801ff85c35ee049ed6d3067bb0d.tar.gz opensim-SC_OLD-f2c1d0e34feba801ff85c35ee049ed6d3067bb0d.tar.bz2 opensim-SC_OLD-f2c1d0e34feba801ff85c35ee049ed6d3067bb0d.tar.xz |
Merge branch 'opensim-master' into dev-appearance
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 72dce6d..d770ad1 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -287,7 +287,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
287 | long start = 0; | 287 | long start = 0; |
288 | using (MemoryStream data = new MemoryStream(primShape.SculptData)) | 288 | using (MemoryStream data = new MemoryStream(primShape.SculptData)) |
289 | { | 289 | { |
290 | meshOsd = (OSDMap)OSDParser.DeserializeLLSDBinary(data, true); | 290 | meshOsd = (OSDMap)OSDParser.DeserializeLLSDBinary(data); |
291 | start = data.Position; | 291 | start = data.Position; |
292 | } | 292 | } |
293 | 293 | ||
@@ -324,7 +324,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
324 | 324 | ||
325 | byte[] decompressedBuf = outMs.GetBuffer(); | 325 | byte[] decompressedBuf = outMs.GetBuffer(); |
326 | 326 | ||
327 | decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf, true); | 327 | decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf); |
328 | } | 328 | } |
329 | } | 329 | } |
330 | } | 330 | } |
@@ -349,6 +349,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
349 | 349 | ||
350 | OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshMap["PositionDomain"])["Max"].AsVector3(); | 350 | OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshMap["PositionDomain"])["Max"].AsVector3(); |
351 | OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshMap["PositionDomain"])["Min"].AsVector3(); | 351 | OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshMap["PositionDomain"])["Min"].AsVector3(); |
352 | ushort faceIndexOffset = (ushort)coords.Count; | ||
352 | 353 | ||
353 | byte[] posBytes = subMeshMap["Position"].AsBinary(); | 354 | byte[] posBytes = subMeshMap["Position"].AsBinary(); |
354 | for (int i = 0; i < posBytes.Length; i += 6) | 355 | for (int i = 0; i < posBytes.Length; i += 6) |
@@ -368,9 +369,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
368 | byte[] triangleBytes = subMeshMap["TriangleList"].AsBinary(); | 369 | byte[] triangleBytes = subMeshMap["TriangleList"].AsBinary(); |
369 | for (int i = 0; i < triangleBytes.Length; i += 6) | 370 | for (int i = 0; i < triangleBytes.Length; i += 6) |
370 | { | 371 | { |
371 | ushort v1 = Utils.BytesToUInt16(triangleBytes, i); | 372 | ushort v1 = (ushort)(Utils.BytesToUInt16(triangleBytes, i) + faceIndexOffset); |
372 | ushort v2 = Utils.BytesToUInt16(triangleBytes, i + 2); | 373 | ushort v2 = (ushort)(Utils.BytesToUInt16(triangleBytes, i + 2) + faceIndexOffset); |
373 | ushort v3 = Utils.BytesToUInt16(triangleBytes, i + 4); | 374 | ushort v3 = (ushort)(Utils.BytesToUInt16(triangleBytes, i + 4) + faceIndexOffset); |
374 | Face f = new Face(v1, v2, v3); | 375 | Face f = new Face(v1, v2, v3); |
375 | faces.Add(f); | 376 | faces.Add(f); |
376 | } | 377 | } |