aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
authorRobert Adams2013-05-17 21:17:54 -0700
committerRobert Adams2013-05-21 15:32:10 -0700
commit9de3979f5b91ae4bf9b05b89ec59999c43514f90 (patch)
treefc4c8e08c77806d6fe08ae8a8eff5172abd70af0 /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
downloadopensim-SC-9de3979f5b91ae4bf9b05b89ec59999c43514f90.zip
opensim-SC-9de3979f5b91ae4bf9b05b89ec59999c43514f90.tar.gz
opensim-SC-9de3979f5b91ae4bf9b05b89ec59999c43514f90.tar.bz2
opensim-SC-9de3979f5b91ae4bf9b05b89ec59999c43514f90.tar.xz
BulletSim: add gImpact shape type. Add logic to use gImpact shape
for prims that have cuts or holes. Default logic to 'off' as it needs debugging.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 64aaa15..32bbc8f 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -230,6 +230,7 @@ public sealed class BSShapeCollection : IDisposable
230 BSShape potentialHull = null; 230 BSShape potentialHull = null;
231 231
232 PrimitiveBaseShape pbs = prim.BaseShape; 232 PrimitiveBaseShape pbs = prim.BaseShape;
233 // Use a simple, one section convex shape for prims that are probably convex (no cuts or twists)
233 if (BSParam.ShouldUseSingleConvexHullForPrims 234 if (BSParam.ShouldUseSingleConvexHullForPrims
234 && pbs != null 235 && pbs != null
235 && !pbs.SculptEntry 236 && !pbs.SculptEntry
@@ -238,7 +239,17 @@ public sealed class BSShapeCollection : IDisposable
238 { 239 {
239 potentialHull = BSShapeConvexHull.GetReference(m_physicsScene, false /* forceRebuild */, prim); 240 potentialHull = BSShapeConvexHull.GetReference(m_physicsScene, false /* forceRebuild */, prim);
240 } 241 }
241 else 242 // Use the GImpact shape if it is a prim that has some concaveness
243 if (potentialHull == null
244 && BSParam.ShouldUseGImpactShapeForPrims
245 && pbs != null
246 && !pbs.SculptEntry
247 )
248 {
249 potentialHull = BSShapeGImpact.GetReference(m_physicsScene, false /* forceRebuild */, prim);
250 }
251 // If not any of the simple cases, just make a hull
252 if (potentialHull == null)
242 { 253 {
243 potentialHull = BSShapeHull.GetReference(m_physicsScene, false /*forceRebuild*/, prim); 254 potentialHull = BSShapeHull.GetReference(m_physicsScene, false /*forceRebuild*/, prim);
244 } 255 }
@@ -261,7 +272,7 @@ public sealed class BSShapeCollection : IDisposable
261 } 272 }
262 else 273 else
263 { 274 {
264 // Update prim.BSShape to reference a mesh of this shape. 275 // Non-physical objects should be just meshes.
265 BSShape potentialMesh = BSShapeMesh.GetReference(m_physicsScene, false /*forceRebuild*/, prim); 276 BSShape potentialMesh = BSShapeMesh.GetReference(m_physicsScene, false /*forceRebuild*/, prim);
266 // If the current shape is not what is on the prim at the moment, time to change. 277 // If the current shape is not what is on the prim at the moment, time to change.
267 if (!prim.PhysShape.HasPhysicalShape 278 if (!prim.PhysShape.HasPhysicalShape