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 | |
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')
3 files changed, 33 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); |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs index c7a2f7e..8012d91 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs | |||
@@ -217,6 +217,10 @@ public static class BulletSimData | |||
217 | { | 217 | { |
218 | 218 | ||
219 | // Map of collisionTypes to flags for collision groups and masks. | 219 | // Map of collisionTypes to flags for collision groups and masks. |
220 | // An object's 'group' is the collison groups this object belongs to | ||
221 | // An object's 'filter' is the groups another object has to belong to in order to collide with me | ||
222 | // A collision happens if ((obj1.group & obj2.filter) != 0) || ((obj2.group & obj1.filter) != 0) | ||
223 | // | ||
220 | // As mentioned above, don't use the CollisionFilterGroups definitions directly in the code | 224 | // As mentioned above, don't use the CollisionFilterGroups definitions directly in the code |
221 | // but, instead, use references to this dictionary. Finding and debugging | 225 | // but, instead, use references to this dictionary. Finding and debugging |
222 | // collision flag problems will be made easier. | 226 | // collision flag problems will be made easier. |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt index a3b3556..1eaa523 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt | |||
@@ -128,6 +128,9 @@ Physical and phantom will drop through the terrain | |||
128 | LINKSETS | 128 | LINKSETS |
129 | ====================================================== | 129 | ====================================================== |
130 | Child prims do not report collisions | 130 | Child prims do not report collisions |
131 | Allow children of a linkset to be phantom: | ||
132 | http://opensim-dev.2196679.n2.nabble.com/Setting-a-single-child-prim-to-Phantom-tp7578513.html | ||
133 | Add OS_STATUS_PHANTOM_PRIM to llSetLinkPrimitaveParamsFast. | ||
131 | Editing a child of a linkset causes the child to go phantom | 134 | Editing a child of a linkset causes the child to go phantom |
132 | Move a child prim once when it is physical and can never move it again without it going phantom | 135 | Move a child prim once when it is physical and can never move it again without it going phantom |
133 | Offset the center of the linkset to be the geometric center of all the prims | 136 | Offset the center of the linkset to be the geometric center of all the prims |