aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
authorDiva Canto2012-10-04 15:33:17 -0700
committerDiva Canto2012-10-04 15:33:17 -0700
commit276fdbc1b3d1001ddb32b5f5f82db0fdf1e39f7d (patch)
tree5ffb03205018d07a7d0590e8c1d0766b1cc2fbaf /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
parentOne more abstraction for GridUser so that it can be overridden in a sub-class. (diff)
parentMake the asset retrieval concurrency a config switch. The current value (diff)
downloadopensim-SC-276fdbc1b3d1001ddb32b5f5f82db0fdf1e39f7d.zip
opensim-SC-276fdbc1b3d1001ddb32b5f5f82db0fdf1e39f7d.tar.gz
opensim-SC-276fdbc1b3d1001ddb32b5f5f82db0fdf1e39f7d.tar.bz2
opensim-SC-276fdbc1b3d1001ddb32b5f5f82db0fdf1e39f7d.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index dee6243..399a133 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
36{ 36{
37public class BSShapeCollection : IDisposable 37public class BSShapeCollection : IDisposable
38{ 38{
39 private static string LogHeader = "[BULLETSIM SHAPE COLLECTION]"; 39 // private static string LogHeader = "[BULLETSIM SHAPE COLLECTION]";
40 40
41 protected BSScene PhysicsScene { get; set; } 41 protected BSScene PhysicsScene { get; set; }
42 42
@@ -108,7 +108,8 @@ public class BSShapeCollection : IDisposable
108 // If we had to select a new shape geometry for the object, 108 // If we had to select a new shape geometry for the object,
109 // rebuild the body around it. 109 // rebuild the body around it.
110 // Updates prim.BSBody with information/pointers to requested body 110 // Updates prim.BSBody with information/pointers to requested body
111 bool newBody = CreateBody((newGeom || forceRebuild), prim, PhysicsScene.World, prim.BSShape, shapeData, bodyCallback); 111 bool newBody = CreateBody((newGeom || forceRebuild), prim, PhysicsScene.World,
112 prim.BSShape, shapeData, bodyCallback);
112 ret = newGeom || newBody; 113 ret = newGeom || newBody;
113 } 114 }
114 DetailLog("{0},BSShapeCollection.GetBodyAndShape,force={1},ret={2},body={3},shape={4}", 115 DetailLog("{0},BSShapeCollection.GetBodyAndShape,force={1},ret={2},body={3},shape={4}",
@@ -140,7 +141,7 @@ public class BSShapeCollection : IDisposable
140 bodyDesc.lastReferenced = System.DateTime.Now; 141 bodyDesc.lastReferenced = System.DateTime.Now;
141 Bodies[body.ID] = bodyDesc; 142 Bodies[body.ID] = bodyDesc;
142 } 143 }
143} 144 }
144 145
145 // Release the usage of a body. 146 // Release the usage of a body.
146 // Called when releasing use of a BSBody. BSShape is handled separately. 147 // Called when releasing use of a BSBody. BSShape is handled separately.
@@ -167,7 +168,7 @@ public class BSShapeCollection : IDisposable
167 { 168 {
168 DetailLog("{0},BSShapeCollection.DereferenceBody,DestroyingBody. ptr={1}", 169 DetailLog("{0},BSShapeCollection.DereferenceBody,DestroyingBody. ptr={1}",
169 body.ID, body.ptr.ToString("X")); 170 body.ID, body.ptr.ToString("X"));
170 // If the caller needs to know, pass the event up. 171 // If the caller needs to know the old body is going away, pass the event up.
171 if (bodyCallback != null) bodyCallback(body); 172 if (bodyCallback != null) bodyCallback(body);
172 173
173 // Zero any reference to the shape so it is not freed when the body is deleted. 174 // Zero any reference to the shape so it is not freed when the body is deleted.
@@ -448,7 +449,8 @@ public class BSShapeCollection : IDisposable
448 ulong newMeshKey = ComputeShapeKey(shapeData, pbs, out lod); 449 ulong newMeshKey = ComputeShapeKey(shapeData, pbs, out lod);
449 450
450 // if this new shape is the same as last time, don't recreate the mesh 451 // if this new shape is the same as last time, don't recreate the mesh
451 if (prim.BSShape.shapeKey == newMeshKey) return false; 452 if (newMeshKey == prim.BSShape.shapeKey && prim.BSShape.type == ShapeData.PhysicsShapeType.SHAPE_MESH)
453 return false;
452 454
453 DetailLog("{0},BSShapeCollection.CreateGeomMesh,create,oldKey={1},newKey={2}", 455 DetailLog("{0},BSShapeCollection.CreateGeomMesh,create,oldKey={1},newKey={2}",
454 prim.LocalID, prim.BSShape.shapeKey.ToString("X"), newMeshKey.ToString("X")); 456 prim.LocalID, prim.BSShape.shapeKey.ToString("X"), newMeshKey.ToString("X"));