diff options
author | dahlia | 2010-10-20 20:39:05 -0700 |
---|---|---|
committer | dahlia | 2010-10-20 20:39:05 -0700 |
commit | 9038218c2d67cd796242e17c7e65adbde05c8538 (patch) | |
tree | ba5a4f4ee69fac333cceb775ca1c1a10a4ef5438 | |
parent | Deleted verbose debug messages that are bringing sims to an halt. Increased t... (diff) | |
download | opensim-SC-9038218c2d67cd796242e17c7e65adbde05c8538.zip opensim-SC-9038218c2d67cd796242e17c7e65adbde05c8538.tar.gz opensim-SC-9038218c2d67cd796242e17c7e65adbde05c8538.tar.bz2 opensim-SC-9038218c2d67cd796242e17c7e65adbde05c8538.tar.xz |
fix combining of multiple physics submeshes
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 72dce6d..1257804 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -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 | } |