aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
authorRobert Adams2013-01-15 15:07:38 -0800
committerRobert Adams2013-01-15 21:08:46 -0800
commit5d098d8f17fe24d9ad2999ddce819787d02989ce (patch)
tree35f64a4781217e822b3793cfa0bec136d9894268 /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
parentBulletSim: add debugging messages to know when assets for physical (diff)
downloadopensim-SC-5d098d8f17fe24d9ad2999ddce819787d02989ce.zip
opensim-SC-5d098d8f17fe24d9ad2999ddce819787d02989ce.tar.gz
opensim-SC-5d098d8f17fe24d9ad2999ddce819787d02989ce.tar.bz2
opensim-SC-5d098d8f17fe24d9ad2999ddce819787d02989ce.tar.xz
BulletSim: don't modify angular parameters when doing LIMIT_MOTOR_UP.
It was a dumb idea to try and do a nose over feature for jumping cars anyway. Add better logging of native shape creation/reuse so can tell the difference.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 4f0d345..9fbfcdc 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -442,7 +442,8 @@ public sealed class BSShapeCollection : IDisposable
442 return ret; 442 return ret;
443 } 443 }
444 444
445 // Create a mesh/hull shape or a native shape if 'nativeShapePossible' is 'true'. 445 // Create a mesh, hull or native shape.
446 // Return 'true' if the prim's shape was changed.
446 public bool CreateGeomNonSpecial(bool forceRebuild, BSPhysObject prim, ShapeDestructionCallback shapeCallback) 447 public bool CreateGeomNonSpecial(bool forceRebuild, BSPhysObject prim, ShapeDestructionCallback shapeCallback)
447 { 448 {
448 bool ret = false; 449 bool ret = false;
@@ -472,7 +473,7 @@ public sealed class BSShapeCollection : IDisposable
472 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,maybeNative,force={1},primScale={2},primSize={3},primShape={4}", 473 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,maybeNative,force={1},primScale={2},primSize={3},primShape={4}",
473 prim.LocalID, forceRebuild, prim.Scale, prim.Size, prim.PhysShape.type); 474 prim.LocalID, forceRebuild, prim.Scale, prim.Size, prim.PhysShape.type);
474 475
475 // It doesn't look like Bullet scales spheres so make sure the scales are all equal 476 // It doesn't look like Bullet scales native spheres so make sure the scales are all equal
476 if ((pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1) 477 if ((pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1)
477 && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z) 478 && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z)
478 { 479 {
@@ -484,9 +485,9 @@ public sealed class BSShapeCollection : IDisposable
484 { 485 {
485 ret = GetReferenceToNativeShape(prim, BSPhysicsShapeType.SHAPE_SPHERE, 486 ret = GetReferenceToNativeShape(prim, BSPhysicsShapeType.SHAPE_SPHERE,
486 FixedShapeKey.KEY_SPHERE, shapeCallback); 487 FixedShapeKey.KEY_SPHERE, shapeCallback);
487 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},shape={2}",
488 prim.LocalID, forceRebuild, prim.PhysShape);
489 } 488 }
489 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,sphere,force={1},rebuilt={2},shape={3}",
490 prim.LocalID, forceRebuild, ret, prim.PhysShape);
490 } 491 }
491 if (!haveShape && pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight) 492 if (!haveShape && pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
492 { 493 {
@@ -498,9 +499,9 @@ public sealed class BSShapeCollection : IDisposable
498 { 499 {
499 ret = GetReferenceToNativeShape( prim, BSPhysicsShapeType.SHAPE_BOX, 500 ret = GetReferenceToNativeShape( prim, BSPhysicsShapeType.SHAPE_BOX,
500 FixedShapeKey.KEY_BOX, shapeCallback); 501 FixedShapeKey.KEY_BOX, shapeCallback);
501 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},shape={2}",
502 prim.LocalID, forceRebuild, prim.PhysShape);
503 } 502 }
503 if (DDetail) DetailLog("{0},BSShapeCollection.CreateGeom,box,force={1},rebuilt={2},shape={3}",
504 prim.LocalID, forceRebuild, ret, prim.PhysShape);
504 } 505 }
505 } 506 }
506 507
@@ -513,7 +514,7 @@ public sealed class BSShapeCollection : IDisposable
513 return ret; 514 return ret;
514 } 515 }
515 516
516 // return 'true' if the shape was changed 517 // return 'true' if the prim's shape was changed.
517 public bool CreateGeomMeshOrHull(BSPhysObject prim, ShapeDestructionCallback shapeCallback) 518 public bool CreateGeomMeshOrHull(BSPhysObject prim, ShapeDestructionCallback shapeCallback)
518 { 519 {
519 520
@@ -921,8 +922,9 @@ public sealed class BSShapeCollection : IDisposable
921 } 922 }
922 } 923 }
923 924
924 // While we figure out the real problem, stick in a simple box for the object. 925 // While we wait for the mesh defining asset to be loaded, stick in a simple box for the object.
925 BulletShape fillinShape = BuildPhysicalNativeShape(prim, BSPhysicsShapeType.SHAPE_BOX, FixedShapeKey.KEY_BOX); 926 BulletShape fillinShape = BuildPhysicalNativeShape(prim, BSPhysicsShapeType.SHAPE_BOX, FixedShapeKey.KEY_BOX);
927 DetailLog("{0},BSShapeCollection.VerifyMeshCreated,boxTempShape", prim.LocalID);
926 928
927 return fillinShape; 929 return fillinShape;
928 } 930 }