diff options
author | Melanie | 2013-05-24 00:45:08 +0100 |
---|---|---|
committer | Melanie | 2013-05-24 00:45:08 +0100 |
commit | 09c2cd0d76e62cbc7bb2d8b0f21caae901af1681 (patch) | |
tree | 1856552dd68bfa23877f28842cb00e9e0089d1c4 /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | BulletSim: specify directory for OpenSim.Region.Physics.Meshing (diff) | |
download | opensim-SC-09c2cd0d76e62cbc7bb2d8b0f21caae901af1681.zip opensim-SC-09c2cd0d76e62cbc7bb2d8b0f21caae901af1681.tar.gz opensim-SC-09c2cd0d76e62cbc7bb2d8b0f21caae901af1681.tar.bz2 opensim-SC-09c2cd0d76e62cbc7bb2d8b0f21caae901af1681.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | 15 |
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 |