aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs30
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);