diff options
author | Robert Adams | 2013-02-03 21:48:11 -0800 |
---|---|---|
committer | Robert Adams | 2013-02-05 16:56:28 -0800 |
commit | 13233da66c96e9fb8b4f8c5c98aa34c8b6ccf1b7 (patch) | |
tree | 98540907b74c8594f83730be45319d6158fdaca9 /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | |
parent | BulletSim: rework some parameter setting implementation moving functionality ... (diff) | |
download | opensim-SC_OLD-13233da66c96e9fb8b4f8c5c98aa34c8b6ccf1b7.zip opensim-SC_OLD-13233da66c96e9fb8b4f8c5c98aa34c8b6ccf1b7.tar.gz opensim-SC_OLD-13233da66c96e9fb8b4f8c5c98aa34c8b6ccf1b7.tar.bz2 opensim-SC_OLD-13233da66c96e9fb8b4f8c5c98aa34c8b6ccf1b7.tar.xz |
BulletSim: add debugging looking for doorway sculpty problems
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs index 9febd90..0af8e13 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | |||
@@ -622,7 +622,6 @@ public sealed class BSShapeCollection : IDisposable | |||
622 | private BulletShape CreatePhysicalMesh(string objName, System.UInt64 newMeshKey, PrimitiveBaseShape pbs, OMV.Vector3 size, float lod) | 622 | private BulletShape CreatePhysicalMesh(string objName, System.UInt64 newMeshKey, PrimitiveBaseShape pbs, OMV.Vector3 size, float lod) |
623 | { | 623 | { |
624 | BulletShape newShape = new BulletShape(); | 624 | BulletShape newShape = new BulletShape(); |
625 | IMesh meshData = null; | ||
626 | 625 | ||
627 | MeshDesc meshDesc; | 626 | MeshDesc meshDesc; |
628 | if (Meshes.TryGetValue(newMeshKey, out meshDesc)) | 627 | if (Meshes.TryGetValue(newMeshKey, out meshDesc)) |
@@ -632,7 +631,7 @@ public sealed class BSShapeCollection : IDisposable | |||
632 | } | 631 | } |
633 | else | 632 | else |
634 | { | 633 | { |
635 | meshData = PhysicsScene.mesher.CreateMesh(objName, pbs, size, lod, true, false); | 634 | IMesh meshData = PhysicsScene.mesher.CreateMesh(objName, pbs, size, lod, true, false); |
636 | 635 | ||
637 | if (meshData != null) | 636 | if (meshData != null) |
638 | { | 637 | { |
@@ -648,8 +647,31 @@ public sealed class BSShapeCollection : IDisposable | |||
648 | verticesAsFloats[vi++] = vv.Z; | 647 | verticesAsFloats[vi++] = vv.Z; |
649 | } | 648 | } |
650 | 649 | ||
651 | // m_log.DebugFormat("{0}: BSShapeCollection.CreatePhysicalMesh: calling CreateMesh. lid={1}, key={2}, indices={3}, vertices={4}", | 650 | // DetailLog("{0},BSShapeCollection.CreatePhysicalMesh,key={1},lod={2},size={3},indices={4},vertices={5}", |
652 | // LogHeader, prim.LocalID, newMeshKey, indices.Length, vertices.Count); | 651 | // BSScene.DetailLogZero, newMeshKey.ToString("X"), lod, size, indices.Length, vertices.Count); |
652 | |||
653 | /* | ||
654 | // DEBUG DEBUG | ||
655 | for (int ii = 0; ii < indices.Length; ii += 3) | ||
656 | { | ||
657 | DetailLog("{0,3}: {1,3},{2,3},{3,3}: <{4,10},{5,10},{6,10}>, <{7,10},{8,10},{9,10}>, <{10,10},{11,10},{12,10}>", | ||
658 | ii / 3, | ||
659 | indices[ii + 0], | ||
660 | indices[ii + 1], | ||
661 | indices[ii + 2], | ||
662 | verticesAsFloats[indices[ii+0] + 0], | ||
663 | verticesAsFloats[indices[ii+0] + 1], | ||
664 | verticesAsFloats[indices[ii+0] + 2], | ||
665 | verticesAsFloats[indices[ii+1] + 0], | ||
666 | verticesAsFloats[indices[ii+1] + 1], | ||
667 | verticesAsFloats[indices[ii+1] + 2], | ||
668 | verticesAsFloats[indices[ii+2] + 0], | ||
669 | verticesAsFloats[indices[ii+2] + 1], | ||
670 | verticesAsFloats[indices[ii+2] + 2] | ||
671 | ); | ||
672 | } | ||
673 | // END DEBUG DEBUG | ||
674 | */ | ||
653 | 675 | ||
654 | newShape = PhysicsScene.PE.CreateMeshShape(PhysicsScene.World, | 676 | newShape = PhysicsScene.PE.CreateMeshShape(PhysicsScene.World, |
655 | indices.GetLength(0), indices, vertices.Count, verticesAsFloats); | 677 | indices.GetLength(0), indices, vertices.Count, verticesAsFloats); |