aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs6
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs138
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs2
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs2
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSActors.cs2
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs6
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs6
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs2
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs22
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs2
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSMotors.cs12
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs6
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs8
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs2
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs20
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs6
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs10
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs6
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs42
20 files changed, 152 insertions, 152 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
index 8a22bc7..231f0f8 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
@@ -75,7 +75,7 @@ private sealed class BulletBodyUnman : BulletBody
75private sealed class BulletShapeUnman : BulletShape 75private sealed class BulletShapeUnman : BulletShape
76{ 76{
77 public IntPtr ptr; 77 public IntPtr ptr;
78 public BulletShapeUnman(IntPtr xx, BSPhysicsShapeType typ) 78 public BulletShapeUnman(IntPtr xx, BSPhysicsShapeType typ)
79 : base() 79 : base()
80 { 80 {
81 ptr = xx; 81 ptr = xx;
@@ -255,7 +255,7 @@ public override BulletShape CreateHullShape(BulletWorld world, int hullCount, fl
255{ 255{
256 BulletWorldUnman worldu = world as BulletWorldUnman; 256 BulletWorldUnman worldu = world as BulletWorldUnman;
257 return new BulletShapeUnman( 257 return new BulletShapeUnman(
258 BSAPICPP.CreateHullShape2(worldu.ptr, hullCount, hulls), 258 BSAPICPP.CreateHullShape2(worldu.ptr, hullCount, hulls),
259 BSPhysicsShapeType.SHAPE_HULL); 259 BSPhysicsShapeType.SHAPE_HULL);
260} 260}
261 261
@@ -1503,7 +1503,7 @@ public static extern void DestroyObject2(IntPtr sim, IntPtr obj);
1503public static extern IntPtr CreateGroundPlaneShape2(uint id, float height, float collisionMargin); 1503public static extern IntPtr CreateGroundPlaneShape2(uint id, float height, float collisionMargin);
1504 1504
1505[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1505[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1506public static extern IntPtr CreateTerrainShape2(uint id, Vector3 size, float minHeight, float maxHeight, 1506public static extern IntPtr CreateTerrainShape2(uint id, Vector3 size, float minHeight, float maxHeight,
1507 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, 1507 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap,
1508 float scaleFactor, float collisionMargin); 1508 float scaleFactor, float collisionMargin);
1509 1509
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs
index 1ef8b17..59780ae 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs
@@ -81,7 +81,7 @@ private sealed class BulletBodyXNA : BulletBody
81private sealed class BulletShapeXNA : BulletShape 81private sealed class BulletShapeXNA : BulletShape
82{ 82{
83 public CollisionShape shape; 83 public CollisionShape shape;
84 public BulletShapeXNA(CollisionShape xx, BSPhysicsShapeType typ) 84 public BulletShapeXNA(CollisionShape xx, BSPhysicsShapeType typ)
85 : base() 85 : base()
86 { 86 {
87 shape = xx; 87 shape = xx;
@@ -137,8 +137,8 @@ private sealed class BulletConstraintXNA : BulletConstraint
137 internal int LastEntityProperty = 0; 137 internal int LastEntityProperty = 0;
138 138
139 internal EntityProperties[] UpdatedObjects; 139 internal EntityProperties[] UpdatedObjects;
140 internal Dictionary<uint, GhostObject> specialCollisionObjects; 140 internal Dictionary<uint, GhostObject> specialCollisionObjects;
141 141
142 private static int m_collisionsThisFrame; 142 private static int m_collisionsThisFrame;
143 private BSScene PhysicsScene { get; set; } 143 private BSScene PhysicsScene { get; set; }
144 144
@@ -151,7 +151,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
151 } 151 }
152 152
153 /// <summary> 153 /// <summary>
154 /// 154 ///
155 /// </summary> 155 /// </summary>
156 /// <param name="p"></param> 156 /// <param name="p"></param>
157 /// <param name="p_2"></param> 157 /// <param name="p_2"></param>
@@ -174,7 +174,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
174 DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world; 174 DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
175 TypedConstraint constraint = (pConstraint as BulletConstraintXNA).constrain; 175 TypedConstraint constraint = (pConstraint as BulletConstraintXNA).constrain;
176 world.AddConstraint(constraint, pDisableCollisionsBetweenLinkedObjects); 176 world.AddConstraint(constraint, pDisableCollisionsBetweenLinkedObjects);
177 177
178 return true; 178 return true;
179 179
180 } 180 }
@@ -300,7 +300,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
300 public override bool GetForceUpdateAllAabbs(BulletWorld pWorld) { 300 public override bool GetForceUpdateAllAabbs(BulletWorld pWorld) {
301 DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world; 301 DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
302 return world.GetForceUpdateAllAabbs(); 302 return world.GetForceUpdateAllAabbs();
303 303
304 } 304 }
305 public override void SetForceUpdateAllAabbs(BulletWorld pWorld, bool pForce) 305 public override void SetForceUpdateAllAabbs(BulletWorld pWorld, bool pForce)
306 { 306 {
@@ -404,7 +404,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
404 IndexedMatrix mat = IndexedMatrix.CreateFromQuaternion(vquaternion); 404 IndexedMatrix mat = IndexedMatrix.CreateFromQuaternion(vquaternion);
405 mat._origin = vposition; 405 mat._origin = vposition;
406 collisionObject.SetWorldTransform(mat); 406 collisionObject.SetWorldTransform(mat);
407 407
408 } 408 }
409 409
410 public override Vector3 GetPosition(BulletBody pCollisionObject) 410 public override Vector3 GetPosition(BulletBody pCollisionObject)
@@ -457,7 +457,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
457 { 457 {
458 CollisionObject collisionObject = (pCollisionObject as BulletBodyXNA).rigidBody; 458 CollisionObject collisionObject = (pCollisionObject as BulletBodyXNA).rigidBody;
459 collisionObject.Activate(pforceactivation); 459 collisionObject.Activate(pforceactivation);
460 460
461 } 461 }
462 462
463 public override Quaternion GetOrientation(BulletBody pCollisionObject) 463 public override Quaternion GetOrientation(BulletBody pCollisionObject)
@@ -486,7 +486,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
486 { 486 {
487 CollisionObject collisionObject = (pCollisionObject as BulletBodyXNA).rigidBody; 487 CollisionObject collisionObject = (pCollisionObject as BulletBodyXNA).rigidBody;
488 return collisionObject.GetCcdSweptSphereRadius(); 488 return collisionObject.GetCcdSweptSphereRadius();
489 489
490 } 490 }
491 491
492 public override IntPtr GetUserPointer(BulletBody pCollisionObject) 492 public override IntPtr GetUserPointer(BulletBody pCollisionObject)
@@ -559,8 +559,8 @@ private sealed class BulletConstraintXNA : BulletConstraint
559 } 559 }
560 560
561 561
562 public override BulletConstraint Create6DofConstraint(BulletWorld pWorld, BulletBody pBody1, BulletBody pBody2, 562 public override BulletConstraint Create6DofConstraint(BulletWorld pWorld, BulletBody pBody1, BulletBody pBody2,
563 Vector3 pframe1, Quaternion pframe1rot, Vector3 pframe2, Quaternion pframe2rot, 563 Vector3 pframe1, Quaternion pframe1rot, Vector3 pframe2, Quaternion pframe2rot,
564 bool puseLinearReferenceFrameA, bool pdisableCollisionsBetweenLinkedBodies) 564 bool puseLinearReferenceFrameA, bool pdisableCollisionsBetweenLinkedBodies)
565 565
566 { 566 {
@@ -604,7 +604,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
604 } 604 }
605 605
606 /// <summary> 606 /// <summary>
607 /// 607 ///
608 /// </summary> 608 /// </summary>
609 /// <param name="pWorld"></param> 609 /// <param name="pWorld"></param>
610 /// <param name="pBody1"></param> 610 /// <param name="pBody1"></param>
@@ -824,7 +824,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
824 { 824 {
825 RigidBody body = (pBody as BulletBodyXNA).rigidBody; 825 RigidBody body = (pBody as BulletBodyXNA).rigidBody;
826 float angularDamping = body.GetAngularDamping(); 826 float angularDamping = body.GetAngularDamping();
827 body.SetDamping(lin_damping, angularDamping); 827 body.SetDamping(lin_damping, angularDamping);
828 } 828 }
829 829
830 public override float GetLinearDamping(BulletBody pBody) 830 public override float GetLinearDamping(BulletBody pBody)
@@ -907,7 +907,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
907 RigidBody bo = co as RigidBody; 907 RigidBody bo = co as RigidBody;
908 if (bo == null) 908 if (bo == null)
909 { 909 {
910 910
911 if (world.IsInWorld(co)) 911 if (world.IsInWorld(co))
912 { 912 {
913 world.RemoveCollisionObject(co); 913 world.RemoveCollisionObject(co);
@@ -915,7 +915,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
915 } 915 }
916 else 916 else
917 { 917 {
918 918
919 if (world.IsInWorld(bo)) 919 if (world.IsInWorld(bo))
920 { 920 {
921 world.RemoveRigidBody(bo); 921 world.RemoveRigidBody(bo);
@@ -947,7 +947,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
947 947
948 // TODO: Turn this from a reference copy to a Value Copy. 948 // TODO: Turn this from a reference copy to a Value Copy.
949 BulletShapeXNA shape2 = new BulletShapeXNA(shape1, BSShapeTypeFromBroadPhaseNativeType(shape1.GetShapeType())); 949 BulletShapeXNA shape2 = new BulletShapeXNA(shape1, BSShapeTypeFromBroadPhaseNativeType(shape1.GetShapeType()));
950 950
951 return shape2; 951 return shape2;
952 } 952 }
953 953
@@ -957,7 +957,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
957 return false; 957 return false;
958 } 958 }
959 //(sim.ptr, shape.ptr, prim.LocalID, prim.RawPosition, prim.RawOrientation); 959 //(sim.ptr, shape.ptr, prim.LocalID, prim.RawPosition, prim.RawOrientation);
960 960
961 public override BulletBody CreateBodyFromShape(BulletWorld pWorld, BulletShape pShape, uint pLocalID, Vector3 pRawPosition, Quaternion pRawOrientation) 961 public override BulletBody CreateBodyFromShape(BulletWorld pWorld, BulletShape pShape, uint pLocalID, Vector3 pRawPosition, Quaternion pRawOrientation)
962 { 962 {
963 CollisionWorld world = (pWorld as BulletWorldXNA).world; 963 CollisionWorld world = (pWorld as BulletWorldXNA).world;
@@ -993,11 +993,11 @@ private sealed class BulletConstraintXNA : BulletConstraint
993 m_startWorldTransform = IndexedMatrix.Identity; 993 m_startWorldTransform = IndexedMatrix.Identity;
994 */ 994 */
995 body.SetUserPointer(pLocalID); 995 body.SetUserPointer(pLocalID);
996 996
997 return new BulletBodyXNA(pLocalID, body); 997 return new BulletBodyXNA(pLocalID, body);
998 } 998 }
999 999
1000 1000
1001 public override BulletBody CreateBodyWithDefaultMotionState( BulletShape pShape, uint pLocalID, Vector3 pRawPosition, Quaternion pRawOrientation) 1001 public override BulletBody CreateBodyWithDefaultMotionState( BulletShape pShape, uint pLocalID, Vector3 pRawPosition, Quaternion pRawOrientation)
1002 { 1002 {
1003 1003
@@ -1025,7 +1025,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1025 public override Vector3 GetAnisotripicFriction(BulletConstraint pconstrain) 1025 public override Vector3 GetAnisotripicFriction(BulletConstraint pconstrain)
1026 { 1026 {
1027 1027
1028 /* TODO */ 1028 /* TODO */
1029 return Vector3.Zero; 1029 return Vector3.Zero;
1030 } 1030 }
1031 public override Vector3 SetAnisotripicFriction(BulletConstraint pconstrain, Vector3 frict) { /* TODO */ return Vector3.Zero; } 1031 public override Vector3 SetAnisotripicFriction(BulletConstraint pconstrain, Vector3 frict) { /* TODO */ return Vector3.Zero; }
@@ -1035,7 +1035,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1035 { 1035 {
1036 CollisionObject collisionObject = (pCollisionObject as BulletBodyXNA).rigidBody; 1036 CollisionObject collisionObject = (pCollisionObject as BulletBodyXNA).rigidBody;
1037 return collisionObject.IsStaticObject(); 1037 return collisionObject.IsStaticObject();
1038 1038
1039 } 1039 }
1040 public override bool IsKinematicObject(BulletBody pCollisionObject) 1040 public override bool IsKinematicObject(BulletBody pCollisionObject)
1041 { 1041 {
@@ -1098,10 +1098,10 @@ private sealed class BulletConstraintXNA : BulletConstraint
1098 return new BulletWorldXNA(1, PhysicsScene, BSAPIXNA.Initialize2(worldExtent, configparms, maxCollisions, ref collisionArray, maxUpdates, ref updateArray, null)); 1098 return new BulletWorldXNA(1, PhysicsScene, BSAPIXNA.Initialize2(worldExtent, configparms, maxCollisions, ref collisionArray, maxUpdates, ref updateArray, null));
1099 } 1099 }
1100 1100
1101 private static DiscreteDynamicsWorld Initialize2(Vector3 worldExtent, 1101 private static DiscreteDynamicsWorld Initialize2(Vector3 worldExtent,
1102 ConfigurationParameters[] o, 1102 ConfigurationParameters[] o,
1103 int mMaxCollisionsPerFrame, ref CollisionDesc[] collisionArray, 1103 int mMaxCollisionsPerFrame, ref CollisionDesc[] collisionArray,
1104 int mMaxUpdatesPerFrame, ref EntityProperties[] updateArray, 1104 int mMaxUpdatesPerFrame, ref EntityProperties[] updateArray,
1105 object mDebugLogCallbackHandle) 1105 object mDebugLogCallbackHandle)
1106 { 1106 {
1107 CollisionWorld.WorldData.ParamData p = new CollisionWorld.WorldData.ParamData(); 1107 CollisionWorld.WorldData.ParamData p = new CollisionWorld.WorldData.ParamData();
@@ -1138,9 +1138,9 @@ private sealed class BulletConstraintXNA : BulletConstraint
1138 p.avatarCapsuleDepth = BSParam.AvatarCapsuleDepth; 1138 p.avatarCapsuleDepth = BSParam.AvatarCapsuleDepth;
1139 p.avatarCapsuleHeight = BSParam.AvatarCapsuleHeight; 1139 p.avatarCapsuleHeight = BSParam.AvatarCapsuleHeight;
1140 p.avatarContactProcessingThreshold = BSParam.AvatarContactProcessingThreshold; 1140 p.avatarContactProcessingThreshold = BSParam.AvatarContactProcessingThreshold;
1141 1141
1142 p.vehicleAngularDamping = BSParam.VehicleAngularDamping; 1142 p.vehicleAngularDamping = BSParam.VehicleAngularDamping;
1143 1143
1144 p.maxPersistantManifoldPoolSize = o[0].maxPersistantManifoldPoolSize; 1144 p.maxPersistantManifoldPoolSize = o[0].maxPersistantManifoldPoolSize;
1145 p.maxCollisionAlgorithmPoolSize = o[0].maxCollisionAlgorithmPoolSize; 1145 p.maxCollisionAlgorithmPoolSize = o[0].maxCollisionAlgorithmPoolSize;
1146 p.shouldDisableContactPoolDynamicAllocation = o[0].shouldDisableContactPoolDynamicAllocation; 1146 p.shouldDisableContactPoolDynamicAllocation = o[0].shouldDisableContactPoolDynamicAllocation;
@@ -1160,7 +1160,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1160 p.linkConstraintSolverIterations = BSParam.LinkConstraintSolverIterations; 1160 p.linkConstraintSolverIterations = BSParam.LinkConstraintSolverIterations;
1161 p.physicsLoggingFrames = o[0].physicsLoggingFrames; 1161 p.physicsLoggingFrames = o[0].physicsLoggingFrames;
1162 DefaultCollisionConstructionInfo ccci = new DefaultCollisionConstructionInfo(); 1162 DefaultCollisionConstructionInfo ccci = new DefaultCollisionConstructionInfo();
1163 1163
1164 DefaultCollisionConfiguration cci = new DefaultCollisionConfiguration(); 1164 DefaultCollisionConfiguration cci = new DefaultCollisionConfiguration();
1165 CollisionDispatcher m_dispatcher = new CollisionDispatcher(cci); 1165 CollisionDispatcher m_dispatcher = new CollisionDispatcher(cci);
1166 1166
@@ -1263,7 +1263,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1263 } 1263 }
1264 } 1264 }
1265 return ret; 1265 return ret;
1266 1266
1267 } 1267 }
1268 1268
1269 public override float GetAngularMotionDisc(BulletShape pShape) 1269 public override float GetAngularMotionDisc(BulletShape pShape)
@@ -1353,10 +1353,10 @@ private sealed class BulletConstraintXNA : BulletConstraint
1353 CollisionShape shape = (pShape as BulletShapeXNA).shape; 1353 CollisionShape shape = (pShape as BulletShapeXNA).shape;
1354 gObj.SetCollisionShape(shape); 1354 gObj.SetCollisionShape(shape);
1355 gObj.SetUserPointer(pLocalID); 1355 gObj.SetUserPointer(pLocalID);
1356 1356
1357 if (specialCollisionObjects.ContainsKey(pLocalID)) 1357 if (specialCollisionObjects.ContainsKey(pLocalID))
1358 specialCollisionObjects[pLocalID] = gObj; 1358 specialCollisionObjects[pLocalID] = gObj;
1359 else 1359 else
1360 specialCollisionObjects.Add(pLocalID, gObj); 1360 specialCollisionObjects.Add(pLocalID, gObj);
1361 1361
1362 // TODO: Add to Special CollisionObjects! 1362 // TODO: Add to Special CollisionObjects!
@@ -1447,8 +1447,8 @@ private sealed class BulletConstraintXNA : BulletConstraint
1447 return new BulletShapeXNA(ret, BSShapeTypeFromBroadPhaseNativeType(ret.GetShapeType())); 1447 return new BulletShapeXNA(ret, BSShapeTypeFromBroadPhaseNativeType(ret.GetShapeType()));
1448 } 1448 }
1449 1449
1450 public override BulletShape GetChildShapeFromCompoundShapeIndex(BulletShape cShape, int indx) { 1450 public override BulletShape GetChildShapeFromCompoundShapeIndex(BulletShape cShape, int indx) {
1451 1451
1452 if (cShape == null) 1452 if (cShape == null)
1453 return null; 1453 return null;
1454 CompoundShape compoundShape = (cShape as BulletShapeXNA).shape as CompoundShape; 1454 CompoundShape compoundShape = (cShape as BulletShapeXNA).shape as CompoundShape;
@@ -1456,7 +1456,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1456 BulletShape retShape = new BulletShapeXNA(shape, BSShapeTypeFromBroadPhaseNativeType(shape.GetShapeType())); 1456 BulletShape retShape = new BulletShapeXNA(shape, BSShapeTypeFromBroadPhaseNativeType(shape.GetShapeType()));
1457 1457
1458 1458
1459 return retShape; 1459 return retShape;
1460 } 1460 }
1461 1461
1462 public BSPhysicsShapeType BSShapeTypeFromBroadPhaseNativeType(BroadphaseNativeTypes pin) 1462 public BSPhysicsShapeType BSShapeTypeFromBroadPhaseNativeType(BroadphaseNativeTypes pin)
@@ -1598,8 +1598,8 @@ private sealed class BulletConstraintXNA : BulletConstraint
1598 return new BulletShapeXNA(m_planeshape, BSPhysicsShapeType.SHAPE_GROUNDPLANE); 1598 return new BulletShapeXNA(m_planeshape, BSPhysicsShapeType.SHAPE_GROUNDPLANE);
1599 } 1599 }
1600 1600
1601 public override BulletConstraint Create6DofSpringConstraint(BulletWorld pWorld, BulletBody pBody1, BulletBody pBody2, 1601 public override BulletConstraint Create6DofSpringConstraint(BulletWorld pWorld, BulletBody pBody1, BulletBody pBody2,
1602 Vector3 pframe1, Quaternion pframe1rot, Vector3 pframe2, Quaternion pframe2rot, 1602 Vector3 pframe1, Quaternion pframe1rot, Vector3 pframe2, Quaternion pframe2rot,
1603 bool puseLinearReferenceFrameA, bool pdisableCollisionsBetweenLinkedBodies) 1603 bool puseLinearReferenceFrameA, bool pdisableCollisionsBetweenLinkedBodies)
1604 1604
1605 { 1605 {
@@ -1745,7 +1745,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1745 { 1745 {
1746 DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world; 1746 DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
1747 CompoundShape compoundshape = new CompoundShape(false); 1747 CompoundShape compoundshape = new CompoundShape(false);
1748 1748
1749 compoundshape.SetMargin(world.WorldSettings.Params.collisionMargin); 1749 compoundshape.SetMargin(world.WorldSettings.Params.collisionMargin);
1750 int ii = 1; 1750 int ii = 1;
1751 1751
@@ -1761,7 +1761,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1761 int ender = ((ii + 4) + (vertexCount*3)); 1761 int ender = ((ii + 4) + (vertexCount*3));
1762 for (int iii = ii + 4; iii < ender; iii+=3) 1762 for (int iii = ii + 4; iii < ender; iii+=3)
1763 { 1763 {
1764 1764
1765 virts.Add(new IndexedVector3(pConvHulls[iii], pConvHulls[iii + 1], pConvHulls[iii +2])); 1765 virts.Add(new IndexedVector3(pConvHulls[iii], pConvHulls[iii + 1], pConvHulls[iii +2]));
1766 } 1766 }
1767 ConvexHullShape convexShape = new ConvexHullShape(virts, vertexCount); 1767 ConvexHullShape convexShape = new ConvexHullShape(virts, vertexCount);
@@ -1769,7 +1769,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1769 compoundshape.AddChildShape(ref childTrans, convexShape); 1769 compoundshape.AddChildShape(ref childTrans, convexShape);
1770 ii += (vertexCount*3 + 4); 1770 ii += (vertexCount*3 + 4);
1771 } 1771 }
1772 1772
1773 return new BulletShapeXNA(compoundshape, BSPhysicsShapeType.SHAPE_HULL); 1773 return new BulletShapeXNA(compoundshape, BSPhysicsShapeType.SHAPE_HULL);
1774 } 1774 }
1775 1775
@@ -1791,13 +1791,13 @@ private sealed class BulletConstraintXNA : BulletConstraint
1791 public override BulletShape CreateMeshShape(BulletWorld pWorld, int pIndicesCount, int[] indices, int pVerticesCount, float[] verticesAsFloats) 1791 public override BulletShape CreateMeshShape(BulletWorld pWorld, int pIndicesCount, int[] indices, int pVerticesCount, float[] verticesAsFloats)
1792 { 1792 {
1793 //DumpRaw(indices,verticesAsFloats,pIndicesCount,pVerticesCount); 1793 //DumpRaw(indices,verticesAsFloats,pIndicesCount,pVerticesCount);
1794 1794
1795 for (int iter = 0; iter < pVerticesCount; iter++) 1795 for (int iter = 0; iter < pVerticesCount; iter++)
1796 { 1796 {
1797 if (verticesAsFloats[iter] > 0 && verticesAsFloats[iter] < 0.0001) verticesAsFloats[iter] = 0; 1797 if (verticesAsFloats[iter] > 0 && verticesAsFloats[iter] < 0.0001) verticesAsFloats[iter] = 0;
1798 if (verticesAsFloats[iter] < 0 && verticesAsFloats[iter] > -0.0001) verticesAsFloats[iter] = 0; 1798 if (verticesAsFloats[iter] < 0 && verticesAsFloats[iter] > -0.0001) verticesAsFloats[iter] = 0;
1799 } 1799 }
1800 1800
1801 ObjectArray<int> indicesarr = new ObjectArray<int>(indices); 1801 ObjectArray<int> indicesarr = new ObjectArray<int>(indices);
1802 ObjectArray<float> vertices = new ObjectArray<float>(verticesAsFloats); 1802 ObjectArray<float> vertices = new ObjectArray<float>(verticesAsFloats);
1803 DumpRaw(indicesarr,vertices,pIndicesCount,pVerticesCount); 1803 DumpRaw(indicesarr,vertices,pIndicesCount,pVerticesCount);
@@ -1811,7 +1811,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1811 mesh.m_vertexStride = 3; 1811 mesh.m_vertexStride = 3;
1812 mesh.m_vertexType = PHY_ScalarType.PHY_FLOAT; 1812 mesh.m_vertexType = PHY_ScalarType.PHY_FLOAT;
1813 mesh.m_triangleIndexStride = 3; 1813 mesh.m_triangleIndexStride = 3;
1814 1814
1815 TriangleIndexVertexArray tribuilder = new TriangleIndexVertexArray(); 1815 TriangleIndexVertexArray tribuilder = new TriangleIndexVertexArray();
1816 tribuilder.AddIndexedMesh(mesh, PHY_ScalarType.PHY_INTEGER); 1816 tribuilder.AddIndexedMesh(mesh, PHY_ScalarType.PHY_INTEGER);
1817 BvhTriangleMeshShape meshShape = new BvhTriangleMeshShape(tribuilder, true,true); 1817 BvhTriangleMeshShape meshShape = new BvhTriangleMeshShape(tribuilder, true,true);
@@ -1822,7 +1822,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1822 } 1822 }
1823 public static void DumpRaw(ObjectArray<int>indices, ObjectArray<float> vertices, int pIndicesCount,int pVerticesCount ) 1823 public static void DumpRaw(ObjectArray<int>indices, ObjectArray<float> vertices, int pIndicesCount,int pVerticesCount )
1824 { 1824 {
1825 1825
1826 String fileName = "objTest3.raw"; 1826 String fileName = "objTest3.raw";
1827 String completePath = System.IO.Path.Combine(Util.configDir(), fileName); 1827 String completePath = System.IO.Path.Combine(Util.configDir(), fileName);
1828 StreamWriter sw = new StreamWriter(completePath); 1828 StreamWriter sw = new StreamWriter(completePath);
@@ -1848,7 +1848,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1848 string s = vertices[indices[i * 3]].ToString("0.0000"); 1848 string s = vertices[indices[i * 3]].ToString("0.0000");
1849 s += " " + vertices[indices[i * 3 + 1]].ToString("0.0000"); 1849 s += " " + vertices[indices[i * 3 + 1]].ToString("0.0000");
1850 s += " " + vertices[indices[i * 3 + 2]].ToString("0.0000"); 1850 s += " " + vertices[indices[i * 3 + 2]].ToString("0.0000");
1851 1851
1852 sw.Write(s + "\n"); 1852 sw.Write(s + "\n");
1853 } 1853 }
1854 1854
@@ -1870,7 +1870,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1870 mesh.m_vertexStride = 3; 1870 mesh.m_vertexStride = 3;
1871 mesh.m_vertexType = PHY_ScalarType.PHY_FLOAT; 1871 mesh.m_vertexType = PHY_ScalarType.PHY_FLOAT;
1872 mesh.m_triangleIndexStride = 3; 1872 mesh.m_triangleIndexStride = 3;
1873 1873
1874 TriangleIndexVertexArray tribuilder = new TriangleIndexVertexArray(); 1874 TriangleIndexVertexArray tribuilder = new TriangleIndexVertexArray();
1875 tribuilder.AddIndexedMesh(mesh, PHY_ScalarType.PHY_INTEGER); 1875 tribuilder.AddIndexedMesh(mesh, PHY_ScalarType.PHY_INTEGER);
1876 1876
@@ -1901,7 +1901,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
1901 sw.Close(); 1901 sw.Close();
1902 } 1902 }
1903 1903
1904 public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, 1904 public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight, float[] heightMap,
1905 float scaleFactor, float collisionMargin) 1905 float scaleFactor, float collisionMargin)
1906 { 1906 {
1907 const int upAxis = 2; 1907 const int upAxis = 2;
@@ -1943,14 +1943,14 @@ private sealed class BulletConstraintXNA : BulletConstraint
1943 /* TODO */ 1943 /* TODO */
1944 updatedEntityCount = 0; 1944 updatedEntityCount = 0;
1945 collidersCount = 0; 1945 collidersCount = 0;
1946 1946
1947 1947
1948 int ret = PhysicsStep2(world,timeStep,maxSubSteps,fixedTimeStep,out updatedEntityCount,out world.physicsScene.m_updateArray, out collidersCount, out world.physicsScene.m_collisionArray); 1948 int ret = PhysicsStep2(world,timeStep,maxSubSteps,fixedTimeStep,out updatedEntityCount,out world.physicsScene.m_updateArray, out collidersCount, out world.physicsScene.m_collisionArray);
1949 1949
1950 return ret; 1950 return ret;
1951 } 1951 }
1952 1952
1953 private int PhysicsStep2(BulletWorld pWorld, float timeStep, int m_maxSubSteps, float m_fixedTimeStep, 1953 private int PhysicsStep2(BulletWorld pWorld, float timeStep, int m_maxSubSteps, float m_fixedTimeStep,
1954 out int updatedEntityCount, out EntityProperties[] updatedEntities, 1954 out int updatedEntityCount, out EntityProperties[] updatedEntities,
1955 out int collidersCount, out CollisionDesc[] colliders) 1955 out int collidersCount, out CollisionDesc[] colliders)
1956 { 1956 {
@@ -1959,24 +1959,24 @@ private sealed class BulletConstraintXNA : BulletConstraint
1959 return epic; 1959 return epic;
1960 } 1960 }
1961 1961
1962 private int PhysicsStepint(BulletWorld pWorld,float timeStep, int m_maxSubSteps, float m_fixedTimeStep, out int updatedEntityCount, 1962 private int PhysicsStepint(BulletWorld pWorld,float timeStep, int m_maxSubSteps, float m_fixedTimeStep, out int updatedEntityCount,
1963 out EntityProperties[] updatedEntities, out int collidersCount, out CollisionDesc[] colliders, int maxCollisions, int maxUpdates) 1963 out EntityProperties[] updatedEntities, out int collidersCount, out CollisionDesc[] colliders, int maxCollisions, int maxUpdates)
1964 { 1964 {
1965 int numSimSteps = 0; 1965 int numSimSteps = 0;
1966 Array.Clear(UpdatedObjects, 0, UpdatedObjects.Length); 1966 Array.Clear(UpdatedObjects, 0, UpdatedObjects.Length);
1967 Array.Clear(UpdatedCollisions, 0, UpdatedCollisions.Length); 1967 Array.Clear(UpdatedCollisions, 0, UpdatedCollisions.Length);
1968 LastEntityProperty=0; 1968 LastEntityProperty=0;
1969 1969
1970 1970
1971 1971
1972 1972
1973 1973
1974 1974
1975 LastCollisionDesc=0; 1975 LastCollisionDesc=0;
1976 1976
1977 updatedEntityCount = 0; 1977 updatedEntityCount = 0;
1978 collidersCount = 0; 1978 collidersCount = 0;
1979 1979
1980 1980
1981 if (pWorld is BulletWorldXNA) 1981 if (pWorld is BulletWorldXNA)
1982 { 1982 {
@@ -2033,7 +2033,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
2033 2033
2034 collidersCount = LastCollisionDesc; 2034 collidersCount = LastCollisionDesc;
2035 colliders = UpdatedCollisions; 2035 colliders = UpdatedCollisions;
2036 2036
2037 2037
2038 } 2038 }
2039 else 2039 else
@@ -2041,15 +2041,15 @@ private sealed class BulletConstraintXNA : BulletConstraint
2041 //if (updatedEntities is null) 2041 //if (updatedEntities is null)
2042 //updatedEntities = new List<BulletXNA.EntityProperties>(); 2042 //updatedEntities = new List<BulletXNA.EntityProperties>();
2043 //updatedEntityCount = 0; 2043 //updatedEntityCount = 0;
2044 2044
2045 2045
2046 //collidersCount = 0; 2046 //collidersCount = 0;
2047 2047
2048 updatedEntities = new EntityProperties[0]; 2048 updatedEntities = new EntityProperties[0];
2049 2049
2050 2050
2051 colliders = new CollisionDesc[0]; 2051 colliders = new CollisionDesc[0];
2052 2052
2053 } 2053 }
2054 return numSimSteps; 2054 return numSimSteps;
2055 } 2055 }
@@ -2057,7 +2057,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
2057 { 2057 {
2058 IOverlappingPairCache cache = obj.GetOverlappingPairCache(); 2058 IOverlappingPairCache cache = obj.GetOverlappingPairCache();
2059 ObjectArray<BroadphasePair> pairs = cache.GetOverlappingPairArray(); 2059 ObjectArray<BroadphasePair> pairs = cache.GetOverlappingPairArray();
2060 2060
2061 DiscreteDynamicsWorld world = (PhysicsScene.World as BulletWorldXNA).world; 2061 DiscreteDynamicsWorld world = (PhysicsScene.World as BulletWorldXNA).world;
2062 PersistentManifoldArray manifoldArray = new PersistentManifoldArray(); 2062 PersistentManifoldArray manifoldArray = new PersistentManifoldArray();
2063 BroadphasePair collisionPair; 2063 BroadphasePair collisionPair;
@@ -2069,7 +2069,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
2069 ManifoldPoint pt; 2069 ManifoldPoint pt;
2070 2070
2071 int numPairs = pairs.Count; 2071 int numPairs = pairs.Count;
2072 2072
2073 for (int i = 0; i < numPairs; i++) 2073 for (int i = 0; i < numPairs; i++)
2074 { 2074 {
2075 manifoldArray.Clear(); 2075 manifoldArray.Clear();
@@ -2078,7 +2078,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
2078 collisionPair = world.GetPairCache().FindPair(pairs[i].m_pProxy0, pairs[i].m_pProxy1); 2078 collisionPair = world.GetPairCache().FindPair(pairs[i].m_pProxy0, pairs[i].m_pProxy1);
2079 if (collisionPair == null) 2079 if (collisionPair == null)
2080 continue; 2080 continue;
2081 2081
2082 collisionPair.m_algorithm.GetAllContactManifolds(manifoldArray); 2082 collisionPair.m_algorithm.GetAllContactManifolds(manifoldArray);
2083 for (int j = 0; j < manifoldArray.Count; j++) 2083 for (int j = 0; j < manifoldArray.Count; j++)
2084 { 2084 {
@@ -2101,7 +2101,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
2101 } 2101 }
2102 private static void RecordCollision(BSAPIXNA world, CollisionObject objA, CollisionObject objB, IndexedVector3 contact, IndexedVector3 norm, float penetration) 2102 private static void RecordCollision(BSAPIXNA world, CollisionObject objA, CollisionObject objB, IndexedVector3 contact, IndexedVector3 norm, float penetration)
2103 { 2103 {
2104 2104
2105 IndexedVector3 contactNormal = norm; 2105 IndexedVector3 contactNormal = norm;
2106 if ((objA.GetCollisionFlags() & BulletXNA.BulletCollision.CollisionFlags.BS_WANTS_COLLISIONS) == 0 && 2106 if ((objA.GetCollisionFlags() & BulletXNA.BulletCollision.CollisionFlags.BS_WANTS_COLLISIONS) == 0 &&
2107 (objB.GetCollisionFlags() & BulletXNA.BulletCollision.CollisionFlags.BS_WANTS_COLLISIONS) == 0) 2107 (objB.GetCollisionFlags() & BulletXNA.BulletCollision.CollisionFlags.BS_WANTS_COLLISIONS) == 0)
@@ -2171,11 +2171,11 @@ private sealed class BulletConstraintXNA : BulletConstraint
2171 if (NotMe is BulletBodyXNA && NotMe.HasPhysicalBody) 2171 if (NotMe is BulletBodyXNA && NotMe.HasPhysicalBody)
2172 { 2172 {
2173 CollisionObject AvoidBody = (NotMe as BulletBodyXNA).body; 2173 CollisionObject AvoidBody = (NotMe as BulletBodyXNA).body;
2174 2174
2175 IndexedVector3 rOrigin = new IndexedVector3(_RayOrigin.X, _RayOrigin.Y, _RayOrigin.Z); 2175 IndexedVector3 rOrigin = new IndexedVector3(_RayOrigin.X, _RayOrigin.Y, _RayOrigin.Z);
2176 IndexedVector3 rEnd = new IndexedVector3(_RayOrigin.X, _RayOrigin.Y, _RayOrigin.Z - pRayHeight); 2176 IndexedVector3 rEnd = new IndexedVector3(_RayOrigin.X, _RayOrigin.Y, _RayOrigin.Z - pRayHeight);
2177 using ( 2177 using (
2178 ClosestNotMeRayResultCallback rayCallback = 2178 ClosestNotMeRayResultCallback rayCallback =
2179 new ClosestNotMeRayResultCallback(rOrigin, rEnd, AvoidBody) 2179 new ClosestNotMeRayResultCallback(rOrigin, rEnd, AvoidBody)
2180 ) 2180 )
2181 { 2181 {
@@ -2191,9 +2191,9 @@ private sealed class BulletConstraintXNA : BulletConstraint
2191 return false; 2191 return false;
2192 } 2192 }
2193} 2193}
2194
2195 2194
2196 2195
2196
2197 2197
2198 public class SimMotionState : DefaultMotionState 2198 public class SimMotionState : DefaultMotionState
2199 { 2199 {
@@ -2286,12 +2286,12 @@ private sealed class BulletConstraintXNA : BulletConstraint
2286 m_lastProperties = m_properties; 2286 m_lastProperties = m_properties;
2287 if (m_world.LastEntityProperty < m_world.UpdatedObjects.Length) 2287 if (m_world.LastEntityProperty < m_world.UpdatedObjects.Length)
2288 m_world.UpdatedObjects[m_world.LastEntityProperty++]=(m_properties); 2288 m_world.UpdatedObjects[m_world.LastEntityProperty++]=(m_properties);
2289 2289
2290 //(*m_updatesThisFrame)[m_properties.ID] = &m_properties; 2290 //(*m_updatesThisFrame)[m_properties.ID] = &m_properties;
2291 } 2291 }
2292 2292
2293 2293
2294 2294
2295 2295
2296 } 2296 }
2297 public override void SetRigidBody(RigidBody body) 2297 public override void SetRigidBody(RigidBody body)
@@ -2314,7 +2314,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
2314 (((v1.Z - nEpsilon) < v2.Z) && (v2.Z < (v1.Z + nEpsilon))) && 2314 (((v1.Z - nEpsilon) < v2.Z) && (v2.Z < (v1.Z + nEpsilon))) &&
2315 (((v1.W - nEpsilon) < v2.W) && (v2.W < (v1.W + nEpsilon))); 2315 (((v1.W - nEpsilon) < v2.W) && (v2.W < (v1.W + nEpsilon)));
2316 } 2316 }
2317 2317
2318 } 2318 }
2319} 2319}
2320 2320
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
index ac05979..4e067b5 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs
@@ -115,7 +115,7 @@ public class BSActorAvatarMove : BSActor
115 if (m_velocityMotor == null) 115 if (m_velocityMotor == null)
116 { 116 {
117 // Infinite decay and timescale values so motor only changes current to target values. 117 // Infinite decay and timescale values so motor only changes current to target values.
118 m_velocityMotor = new BSVMotor("BSCharacter.Velocity", 118 m_velocityMotor = new BSVMotor("BSCharacter.Velocity",
119 0.2f, // time scale 119 0.2f, // time scale
120 BSMotor.Infinite, // decay time scale 120 BSMotor.Infinite, // decay time scale
121 BSMotor.InfiniteVector, // friction timescale 121 BSMotor.InfiniteVector, // friction timescale
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs
index 6059af5..7801d8e 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorLockAxis.cs
@@ -63,7 +63,7 @@ public class BSActorLockAxis : BSActor
63 // BSActor.Refresh() 63 // BSActor.Refresh()
64 public override void Refresh() 64 public override void Refresh()
65 { 65 {
66 m_physicsScene.DetailLog("{0},BSActorLockAxis,refresh,lockedAxis={1},enabled={2},pActive={3}", 66 m_physicsScene.DetailLog("{0},BSActorLockAxis,refresh,lockedAxis={1},enabled={2},pActive={3}",
67 m_controllingPrim.LocalID, m_controllingPrim.LockedAxis, Enabled, m_controllingPrim.IsPhysicallyActive); 67 m_controllingPrim.LocalID, m_controllingPrim.LockedAxis, Enabled, m_controllingPrim.IsPhysicallyActive);
68 // If all the axis are free, we don't need to exist 68 // If all the axis are free, we don't need to exist
69 if (m_controllingPrim.LockedAxis == m_controllingPrim.LockedAxisFree) 69 if (m_controllingPrim.LockedAxis == m_controllingPrim.LockedAxisFree)
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActors.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActors.cs
index 5e3f1c4..fff63e4 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSActors.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSActors.cs
@@ -117,7 +117,7 @@ public class BSActorCollection
117/// Each physical object can have 'actors' who are pushing the object around. 117/// Each physical object can have 'actors' who are pushing the object around.
118/// This can be used for hover, locking axis, making vehicles, etc. 118/// This can be used for hover, locking axis, making vehicles, etc.
119/// Each physical object can have multiple actors acting on it. 119/// Each physical object can have multiple actors acting on it.
120/// 120///
121/// An actor usually registers itself with physics scene events (pre-step action) 121/// An actor usually registers itself with physics scene events (pre-step action)
122/// and modifies the parameters on the host physical object. 122/// and modifies the parameters on the host physical object.
123/// </summary> 123/// </summary>
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs
index bfeec24..3378c93 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs
@@ -298,7 +298,7 @@ public abstract class BSAPITemplate
298{ 298{
299// Returns the name of the underlying Bullet engine 299// Returns the name of the underlying Bullet engine
300public abstract string BulletEngineName { get; } 300public abstract string BulletEngineName { get; }
301public abstract string BulletEngineVersion { get; protected set;} 301public abstract string BulletEngineVersion { get; protected set;}
302 302
303// Initialization and simulation 303// Initialization and simulation
304public abstract BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms, 304public abstract BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms,
@@ -373,7 +373,7 @@ public abstract void DestroyObject(BulletWorld sim, BulletBody obj);
373// ===================================================================================== 373// =====================================================================================
374public abstract BulletShape CreateGroundPlaneShape(UInt32 id, float height, float collisionMargin); 374public abstract BulletShape CreateGroundPlaneShape(UInt32 id, float height, float collisionMargin);
375 375
376public abstract BulletShape CreateTerrainShape(UInt32 id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, 376public abstract BulletShape CreateTerrainShape(UInt32 id, Vector3 size, float minHeight, float maxHeight, float[] heightMap,
377 float scaleFactor, float collisionMargin); 377 float scaleFactor, float collisionMargin);
378 378
379// ===================================================================================== 379// =====================================================================================
@@ -388,7 +388,7 @@ public abstract BulletConstraint Create6DofConstraintToPoint(BulletWorld world,
388 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); 388 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies);
389 389
390public abstract BulletConstraint Create6DofConstraintFixed(BulletWorld world, BulletBody obj1, 390public abstract BulletConstraint Create6DofConstraintFixed(BulletWorld world, BulletBody obj1,
391 Vector3 frameInBloc, Quaternion frameInBrot, 391 Vector3 frameInBloc, Quaternion frameInBrot,
392 bool useLinearReferenceFrameB, bool disableCollisionsBetweenLinkedBodies); 392 bool useLinearReferenceFrameB, bool disableCollisionsBetweenLinkedBodies);
393 393
394public abstract BulletConstraint Create6DofSpringConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, 394public abstract BulletConstraint Create6DofSpringConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2,
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index e12fc8e..542f732 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -371,7 +371,7 @@ public sealed class BSCharacter : BSPhysObject
371 public override float Mass { get { return _mass; } } 371 public override float Mass { get { return _mass; } }
372 372
373 // used when we only want this prim's mass and not the linkset thing 373 // used when we only want this prim's mass and not the linkset thing
374 public override float RawMass { 374 public override float RawMass {
375 get {return _mass; } 375 get {return _mass; }
376 } 376 }
377 public override void UpdatePhysicalMassProperties(float physMass, bool inWorld) 377 public override void UpdatePhysicalMassProperties(float physMass, bool inWorld)
@@ -586,7 +586,7 @@ public sealed class BSCharacter : BSPhysObject
586 } 586 }
587 public override float ForceBuoyancy { 587 public override float ForceBuoyancy {
588 get { return _buoyancy; } 588 get { return _buoyancy; }
589 set { 589 set {
590 PhysScene.AssertInTaintTime("BSCharacter.ForceBuoyancy"); 590 PhysScene.AssertInTaintTime("BSCharacter.ForceBuoyancy");
591 591
592 _buoyancy = value; 592 _buoyancy = value;
@@ -647,7 +647,7 @@ public sealed class BSCharacter : BSPhysObject
647 private OMV.Vector3 ComputeAvatarScale(OMV.Vector3 size) 647 private OMV.Vector3 ComputeAvatarScale(OMV.Vector3 size)
648 { 648 {
649 OMV.Vector3 newScale; 649 OMV.Vector3 newScale;
650 650
651 // Bullet's capsule total height is the "passed height + radius * 2"; 651 // Bullet's capsule total height is the "passed height + radius * 2";
652 // The base capsule is 1 diameter and 2 height (passed radius=0.5, passed height = 1) 652 // The base capsule is 1 diameter and 2 height (passed radius=0.5, passed height = 1)
653 // The number we pass in for 'scaling' is the multiplier to get that base 653 // The number we pass in for 'scaling' is the multiplier to get that base
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs
index 7714a03..ed89f63 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintHinge.cs
@@ -45,7 +45,7 @@ public sealed class BSConstraintHinge : BSConstraint
45 m_body1 = obj1; 45 m_body1 = obj1;
46 m_body2 = obj2; 46 m_body2 = obj2;
47 m_constraint = PhysicsScene.PE.CreateHingeConstraint(world, obj1, obj2, 47 m_constraint = PhysicsScene.PE.CreateHingeConstraint(world, obj1, obj2,
48 pivotInA, pivotInB, axisInA, axisInB, 48 pivotInA, pivotInB, axisInA, axisInB,
49 useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies); 49 useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies);
50 m_enabled = true; 50 m_enabled = true;
51 } 51 }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index 56d2415..f535e50 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -1019,7 +1019,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1019 Vector3 origVelW = VehicleVelocity; // DEBUG DEBUG 1019 Vector3 origVelW = VehicleVelocity; // DEBUG DEBUG
1020 VehicleVelocity /= VehicleVelocity.Length(); 1020 VehicleVelocity /= VehicleVelocity.Length();
1021 VehicleVelocity *= BSParam.VehicleMaxLinearVelocity; 1021 VehicleVelocity *= BSParam.VehicleMaxLinearVelocity;
1022 VDetailLog("{0}, MoveLinear,clampMax,origVelW={1},lenSq={2},maxVelSq={3},,newVelW={4}", 1022 VDetailLog("{0}, MoveLinear,clampMax,origVelW={1},lenSq={2},maxVelSq={3},,newVelW={4}",
1023 ControllingPrim.LocalID, origVelW, newVelocityLengthSq, BSParam.VehicleMaxLinearVelocitySquared, VehicleVelocity); 1023 ControllingPrim.LocalID, origVelW, newVelocityLengthSq, BSParam.VehicleMaxLinearVelocitySquared, VehicleVelocity);
1024 } 1024 }
1025 else if (newVelocityLengthSq < 0.001f) 1025 else if (newVelocityLengthSq < 0.001f)
@@ -1094,7 +1094,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1094 if (VehiclePosition.Z > m_VhoverTargetHeight) 1094 if (VehiclePosition.Z > m_VhoverTargetHeight)
1095 m_VhoverTargetHeight = VehiclePosition.Z; 1095 m_VhoverTargetHeight = VehiclePosition.Z;
1096 } 1096 }
1097 1097
1098 if ((m_flags & VehicleFlag.LOCK_HOVER_HEIGHT) != 0) 1098 if ((m_flags & VehicleFlag.LOCK_HOVER_HEIGHT) != 0)
1099 { 1099 {
1100 if (Math.Abs(VehiclePosition.Z - m_VhoverTargetHeight) > 0.2f) 1100 if (Math.Abs(VehiclePosition.Z - m_VhoverTargetHeight) > 0.2f)
@@ -1188,7 +1188,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1188 // used with conjunction with banking: the strength of the banking will decay when the 1188 // used with conjunction with banking: the strength of the banking will decay when the
1189 // vehicle no longer experiences collisions. The decay timescale is the same as 1189 // vehicle no longer experiences collisions. The decay timescale is the same as
1190 // VEHICLE_BANKING_TIMESCALE. This is to help prevent ground vehicles from steering 1190 // VEHICLE_BANKING_TIMESCALE. This is to help prevent ground vehicles from steering
1191 // when they are in mid jump. 1191 // when they are in mid jump.
1192 // TODO: this code is wrong. Also, what should it do for boats (height from water)? 1192 // TODO: this code is wrong. Also, what should it do for boats (height from water)?
1193 // This is just using the ground and a general collision check. Should really be using 1193 // This is just using the ground and a general collision check. Should really be using
1194 // a downward raycast to find what is below. 1194 // a downward raycast to find what is below.
@@ -1254,7 +1254,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1254 1254
1255 VehicleAddForce(appliedGravity); 1255 VehicleAddForce(appliedGravity);
1256 1256
1257 VDetailLog("{0}, MoveLinear,applyGravity,vehGrav={1},collid={2},fudge={3},mass={4},appliedForce={3}", 1257 VDetailLog("{0}, MoveLinear,applyGravity,vehGrav={1},collid={2},fudge={3},mass={4},appliedForce={3}",
1258 ControllingPrim.LocalID, m_VehicleGravity, 1258 ControllingPrim.LocalID, m_VehicleGravity,
1259 ControllingPrim.IsColliding, BSParam.VehicleGroundGravityFudge, m_vehicleMass, appliedGravity); 1259 ControllingPrim.IsColliding, BSParam.VehicleGroundGravityFudge, m_vehicleMass, appliedGravity);
1260 } 1260 }
@@ -1330,7 +1330,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1330 // From http://wiki.secondlife.com/wiki/LlSetVehicleFlags : 1330 // From http://wiki.secondlife.com/wiki/LlSetVehicleFlags :
1331 // This flag prevents linear deflection parallel to world z-axis. This is useful 1331 // This flag prevents linear deflection parallel to world z-axis. This is useful
1332 // for preventing ground vehicles with large linear deflection, like bumper cars, 1332 // for preventing ground vehicles with large linear deflection, like bumper cars,
1333 // from climbing their linear deflection into the sky. 1333 // from climbing their linear deflection into the sky.
1334 // That is, NO_DEFLECTION_UP says angular motion should not add any pitch or roll movement 1334 // That is, NO_DEFLECTION_UP says angular motion should not add any pitch or roll movement
1335 // TODO: This is here because this is where ODE put it but documentation says it 1335 // TODO: This is here because this is where ODE put it but documentation says it
1336 // is a linear effect. Where should this check go? 1336 // is a linear effect. Where should this check go?
@@ -1463,7 +1463,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1463 VehicleRotationalVelocity += (vertContributionV * VehicleOrientation); 1463 VehicleRotationalVelocity += (vertContributionV * VehicleOrientation);
1464 1464
1465 VDetailLog("{0}, MoveAngular,verticalAttraction,,origRotVW={1},vertError={2},unscaledV={3},eff={4},ts={5},vertContribV={6}", 1465 VDetailLog("{0}, MoveAngular,verticalAttraction,,origRotVW={1},vertError={2},unscaledV={3},eff={4},ts={5},vertContribV={6}",
1466 Prim.LocalID, origRotVelW, verticalError, unscaledContribVerticalErrorV, 1466 Prim.LocalID, origRotVelW, verticalError, unscaledContribVerticalErrorV,
1467 m_verticalAttractionEfficiency, m_verticalAttractionTimescale, vertContributionV); 1467 m_verticalAttractionEfficiency, m_verticalAttractionTimescale, vertContributionV);
1468 */ 1468 */
1469 } 1469 }
@@ -1530,13 +1530,13 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1530 // produce a angular velocity around the yaw-axis, causing the vehicle to turn. The magnitude 1530 // produce a angular velocity around the yaw-axis, causing the vehicle to turn. The magnitude
1531 // of the yaw effect will be proportional to the 1531 // of the yaw effect will be proportional to the
1532 // VEHICLE_BANKING_EFFICIENCY, the angle of the roll rotation, and sometimes the vehicle's 1532 // VEHICLE_BANKING_EFFICIENCY, the angle of the roll rotation, and sometimes the vehicle's
1533 // velocity along its preferred axis of motion. 1533 // velocity along its preferred axis of motion.
1534 // The VEHICLE_BANKING_EFFICIENCY can vary between -1 and +1. When it is positive then any 1534 // The VEHICLE_BANKING_EFFICIENCY can vary between -1 and +1. When it is positive then any
1535 // positive rotation (by the right-hand rule) about the roll-axis will effect a 1535 // positive rotation (by the right-hand rule) about the roll-axis will effect a
1536 // (negative) torque around the yaw-axis, making it turn to the right--that is the 1536 // (negative) torque around the yaw-axis, making it turn to the right--that is the
1537 // vehicle will lean into the turn, which is how real airplanes and motorcycle's work. 1537 // vehicle will lean into the turn, which is how real airplanes and motorcycle's work.
1538 // Negating the banking coefficient will make it so that the vehicle leans to the 1538 // Negating the banking coefficient will make it so that the vehicle leans to the
1539 // outside of the turn (not very "physical" but might allow interesting vehicles so why not?). 1539 // outside of the turn (not very "physical" but might allow interesting vehicles so why not?).
1540 // The VEHICLE_BANKING_MIX is a fake (i.e. non-physical) parameter that is useful for making 1540 // The VEHICLE_BANKING_MIX is a fake (i.e. non-physical) parameter that is useful for making
1541 // banking vehicles do what you want rather than what the laws of physics allow. 1541 // banking vehicles do what you want rather than what the laws of physics allow.
1542 // For example, consider a real motorcycle...it must be moving forward in order for 1542 // For example, consider a real motorcycle...it must be moving forward in order for
@@ -1548,11 +1548,11 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1548 // totally static (0.0) and totally dynamic (1.0). By "static" we mean that the 1548 // totally static (0.0) and totally dynamic (1.0). By "static" we mean that the
1549 // banking effect depends only on the vehicle's rotation about its roll-axis compared 1549 // banking effect depends only on the vehicle's rotation about its roll-axis compared
1550 // to "dynamic" where the banking is also proportional to its velocity along its 1550 // to "dynamic" where the banking is also proportional to its velocity along its
1551 // roll-axis. Finding the best value of the "mixture" will probably require trial and error. 1551 // roll-axis. Finding the best value of the "mixture" will probably require trial and error.
1552 // The time it takes for the banking behavior to defeat a preexisting angular velocity about the 1552 // The time it takes for the banking behavior to defeat a preexisting angular velocity about the
1553 // world z-axis is determined by the VEHICLE_BANKING_TIMESCALE. So if you want the vehicle to 1553 // world z-axis is determined by the VEHICLE_BANKING_TIMESCALE. So if you want the vehicle to
1554 // bank quickly then give it a banking timescale of about a second or less, otherwise you can 1554 // bank quickly then give it a banking timescale of about a second or less, otherwise you can
1555 // make a sluggish vehicle by giving it a timescale of several seconds. 1555 // make a sluggish vehicle by giving it a timescale of several seconds.
1556 public void ComputeAngularBanking() 1556 public void ComputeAngularBanking()
1557 { 1557 {
1558 if (enableAngularBanking && m_bankingEfficiency != 0 && m_verticalAttractionTimescale < m_verticalAttractionCutoff) 1558 if (enableAngularBanking && m_bankingEfficiency != 0 && m_verticalAttractionTimescale < m_verticalAttractionCutoff)
@@ -1581,7 +1581,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
1581 1581
1582 //VehicleRotationalVelocity += bankingContributionV * VehicleOrientation; 1582 //VehicleRotationalVelocity += bankingContributionV * VehicleOrientation;
1583 VehicleRotationalVelocity += bankingContributionV; 1583 VehicleRotationalVelocity += bankingContributionV;
1584 1584
1585 1585
1586 VDetailLog("{0}, MoveAngular,Banking,rollComp={1},speed={2},rollComp={3},yAng={4},mYAng={5},ret={6}", 1586 VDetailLog("{0}, MoveAngular,Banking,rollComp={1},speed={2},rollComp={3},yAng={4},mYAng={5},ret={6}",
1587 ControllingPrim.LocalID, rollComponents, VehicleForwardSpeed, rollComponents, yawAngle, mixedYawAngle, bankingContributionV); 1587 ControllingPrim.LocalID, rollComponents, VehicleForwardSpeed, rollComponents, yawAngle, mixedYawAngle, bankingContributionV);
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
index 6d0d0eb..76c2187 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
@@ -214,7 +214,7 @@ public abstract class BSLinkset
214 // I am the root of a linkset and a new child is being added 214 // I am the root of a linkset and a new child is being added
215 // Called while LinkActivity is locked. 215 // Called while LinkActivity is locked.
216 protected abstract void AddChildToLinkset(BSPrimLinkable child); 216 protected abstract void AddChildToLinkset(BSPrimLinkable child);
217 217
218 // I am the root of a linkset and one of my children is being removed. 218 // I am the root of a linkset and one of my children is being removed.
219 // Safe to call even if the child is not really in my linkset. 219 // Safe to call even if the child is not really in my linkset.
220 protected abstract void RemoveChildFromLinkset(BSPrimLinkable child); 220 protected abstract void RemoveChildFromLinkset(BSPrimLinkable child);
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index 01ada3f..1fd541f 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -114,7 +114,7 @@ public sealed class BSLinksetCompound : BSLinkset
114 // Schedule a refresh to happen after all the other taint processing. 114 // Schedule a refresh to happen after all the other taint processing.
115 private void ScheduleRebuild(BSPrimLinkable requestor) 115 private void ScheduleRebuild(BSPrimLinkable requestor)
116 { 116 {
117 DetailLog("{0},BSLinksetCompound.ScheduleRebuild,,rebuilding={1},hasChildren={2},actuallyScheduling={3}", 117 DetailLog("{0},BSLinksetCompound.ScheduleRebuild,,rebuilding={1},hasChildren={2},actuallyScheduling={3}",
118 requestor.LocalID, Rebuilding, HasAnyChildren, (!Rebuilding && HasAnyChildren)); 118 requestor.LocalID, Rebuilding, HasAnyChildren, (!Rebuilding && HasAnyChildren));
119 // When rebuilding, it is possible to set properties that would normally require a rebuild. 119 // When rebuilding, it is possible to set properties that would normally require a rebuild.
120 // If already rebuilding, don't request another rebuild. 120 // If already rebuilding, don't request another rebuild.
@@ -208,7 +208,7 @@ public sealed class BSLinksetCompound : BSLinkset
208 // and that is caused by us updating the object. 208 // and that is caused by us updating the object.
209 if ((whichUpdated & ~(UpdatedProperties.Position | UpdatedProperties.Orientation)) == 0) 209 if ((whichUpdated & ~(UpdatedProperties.Position | UpdatedProperties.Orientation)) == 0)
210 { 210 {
211 // Find the physical instance of the child 211 // Find the physical instance of the child
212 if (LinksetRoot.PhysShape.HasPhysicalShape && m_physicsScene.PE.IsCompound(LinksetRoot.PhysShape.physShapeInfo)) 212 if (LinksetRoot.PhysShape.HasPhysicalShape && m_physicsScene.PE.IsCompound(LinksetRoot.PhysShape.physShapeInfo))
213 { 213 {
214 // It is possible that the linkset is still under construction and the child is not yet 214 // It is possible that the linkset is still under construction and the child is not yet
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs
index 9501e2d..0128d8d 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs
@@ -102,7 +102,7 @@ public class BSVMotor : BSMotor
102 return ErrorIsZero(LastError); 102 return ErrorIsZero(LastError);
103 } 103 }
104 public virtual bool ErrorIsZero(Vector3 err) 104 public virtual bool ErrorIsZero(Vector3 err)
105 { 105 {
106 return (err == Vector3.Zero || err.ApproxEquals(Vector3.Zero, ErrorZeroThreshold)); 106 return (err == Vector3.Zero || err.ApproxEquals(Vector3.Zero, ErrorZeroThreshold));
107 } 107 }
108 108
@@ -115,7 +115,7 @@ public class BSVMotor : BSMotor
115 CurrentValue = TargetValue = Vector3.Zero; 115 CurrentValue = TargetValue = Vector3.Zero;
116 ErrorZeroThreshold = 0.001f; 116 ErrorZeroThreshold = 0.001f;
117 } 117 }
118 public BSVMotor(string useName, float timeScale, float decayTimeScale, Vector3 frictionTimeScale, float efficiency) 118 public BSVMotor(string useName, float timeScale, float decayTimeScale, Vector3 frictionTimeScale, float efficiency)
119 : this(useName) 119 : this(useName)
120 { 120 {
121 TimeScale = timeScale; 121 TimeScale = timeScale;
@@ -237,7 +237,7 @@ public class BSVMotor : BSMotor
237 MDetailLog("{0},BSVMotor.Test,{1},===================================== BEGIN Test Output", BSScene.DetailLogZero, UseName); 237 MDetailLog("{0},BSVMotor.Test,{1},===================================== BEGIN Test Output", BSScene.DetailLogZero, UseName);
238 MDetailLog("{0},BSVMotor.Test,{1},timeScale={2},targDlyTS={3},frictTS={4},eff={5},curr={6},tgt={7}", 238 MDetailLog("{0},BSVMotor.Test,{1},timeScale={2},targDlyTS={3},frictTS={4},eff={5},curr={6},tgt={7}",
239 BSScene.DetailLogZero, UseName, 239 BSScene.DetailLogZero, UseName,
240 TimeScale, TargetValueDecayTimeScale, FrictionTimescale, Efficiency, 240 TimeScale, TargetValueDecayTimeScale, FrictionTimescale, Efficiency,
241 CurrentValue, TargetValue); 241 CurrentValue, TargetValue);
242 242
243 LastError = BSMotor.InfiniteVector; 243 LastError = BSMotor.InfiniteVector;
@@ -248,7 +248,7 @@ public class BSVMotor : BSMotor
248 BSScene.DetailLogZero, UseName, CurrentValue, TargetValue, LastError, lastStep); 248 BSScene.DetailLogZero, UseName, CurrentValue, TargetValue, LastError, lastStep);
249 } 249 }
250 MDetailLog("{0},BSVMotor.Test,{1},===================================== END Test Output", BSScene.DetailLogZero, UseName); 250 MDetailLog("{0},BSVMotor.Test,{1},===================================== END Test Output", BSScene.DetailLogZero, UseName);
251 251
252 252
253 } 253 }
254 254
@@ -279,7 +279,7 @@ public class BSFMotor : BSMotor
279 return ErrorIsZero(LastError); 279 return ErrorIsZero(LastError);
280 } 280 }
281 public virtual bool ErrorIsZero(float err) 281 public virtual bool ErrorIsZero(float err)
282 { 282 {
283 return (err >= -ErrorZeroThreshold && err <= ErrorZeroThreshold); 283 return (err >= -ErrorZeroThreshold && err <= ErrorZeroThreshold);
284 } 284 }
285 285
@@ -410,7 +410,7 @@ public class BSPIDVMotor : BSVMotor
410 // The factors are vectors for the three dimensions. This is the proportional of each 410 // The factors are vectors for the three dimensions. This is the proportional of each
411 // that is applied. This could be multiplied through the actual factors but it 411 // that is applied. This could be multiplied through the actual factors but it
412 // is sometimes easier to manipulate the factors and their mix separately. 412 // is sometimes easier to manipulate the factors and their mix separately.
413 // to 413 // to
414 public Vector3 FactorMix; 414 public Vector3 FactorMix;
415 415
416 // Arbritrary factor range. 416 // Arbritrary factor range.
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index 980d405..5ebeace 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
37{ 37{
38public static class BSParam 38public static class BSParam
39{ 39{
40 private static string LogHeader = "[BULLETSIM PARAMETERS]"; 40 private static string LogHeader = "[BULLETSIM PARAMETERS]";
41 41
42 // Tuning notes: 42 // Tuning notes:
43 // From: http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?t=6575 43 // From: http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?t=6575
@@ -51,7 +51,7 @@ public static class BSParam
51 // This is separate/independent from the collision margin. The collision margin increases the object a bit 51 // This is separate/independent from the collision margin. The collision margin increases the object a bit
52 // to improve collision detection performance and accuracy. 52 // to improve collision detection performance and accuracy.
53 // =================== 53 // ===================
54 // From: 54 // From:
55 55
56 // Level of Detail values kept as float because that's what the Meshmerizer wants 56 // Level of Detail values kept as float because that's what the Meshmerizer wants
57 public static float MeshLOD { get; private set; } 57 public static float MeshLOD { get; private set; }
@@ -636,7 +636,7 @@ public static class BSParam
636 new ParameterDefn<bool>("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count", 636 new ParameterDefn<bool>("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count",
637 false, 637 false,
638 (s) => { return ShouldDisableContactPoolDynamicAllocation; }, 638 (s) => { return ShouldDisableContactPoolDynamicAllocation; },
639 (s,v) => { ShouldDisableContactPoolDynamicAllocation = v; 639 (s,v) => { ShouldDisableContactPoolDynamicAllocation = v;
640 s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = NumericBool(v); } ), 640 s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = NumericBool(v); } ),
641 new ParameterDefn<bool>("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step", 641 new ParameterDefn<bool>("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step",
642 false, 642 false,
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 6a3ada2..28d4bd7 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
38 * Class to wrap all objects. 38 * Class to wrap all objects.
39 * The rest of BulletSim doesn't need to keep checking for avatars or prims 39 * The rest of BulletSim doesn't need to keep checking for avatars or prims
40 * unless the difference is significant. 40 * unless the difference is significant.
41 * 41 *
42 * Variables in the physicsl objects are in three forms: 42 * Variables in the physicsl objects are in three forms:
43 * VariableName: used by the simulator and performs taint operations, etc 43 * VariableName: used by the simulator and performs taint operations, etc
44 * RawVariableName: direct reference to the BulletSim storage for the variable value 44 * RawVariableName: direct reference to the BulletSim storage for the variable value
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
52 * SOP.ApplyImpulse SOP.ApplyAngularImpulse SOP.SetAngularImpulse SOP.SetForce 52 * SOP.ApplyImpulse SOP.ApplyAngularImpulse SOP.SetAngularImpulse SOP.SetForce
53 * SOG.ApplyImpulse SOG.ApplyAngularImpulse SOG.SetAngularImpulse 53 * SOG.ApplyImpulse SOG.ApplyAngularImpulse SOG.SetAngularImpulse
54 * PA.AddForce PA.AddAngularForce PA.Torque = v PA.Force = v 54 * PA.AddForce PA.AddAngularForce PA.Torque = v PA.Force = v
55 * BS.ApplyCentralForce BS.ApplyTorque 55 * BS.ApplyCentralForce BS.ApplyTorque
56 */ 56 */
57 57
58// Flags used to denote which properties updates when making UpdateProperties calls to linksets, etc. 58// Flags used to denote which properties updates when making UpdateProperties calls to linksets, etc.
@@ -353,7 +353,7 @@ public abstract class BSPhysObject : PhysicsActor
353 } 353 }
354 public override bool CollidingObj { 354 public override bool CollidingObj {
355 get { return (CollidingObjectStep == PhysScene.SimulationStep); } 355 get { return (CollidingObjectStep == PhysScene.SimulationStep); }
356 set { 356 set {
357 if (value) 357 if (value)
358 CollidingObjectStep = PhysScene.SimulationStep; 358 CollidingObjectStep = PhysScene.SimulationStep;
359 else 359 else
@@ -447,7 +447,7 @@ public abstract class BSPhysObject : PhysicsActor
447 447
448 // The CollisionCollection instance is passed around in the simulator. 448 // The CollisionCollection instance is passed around in the simulator.
449 // Make sure we don't have a handle to that one and that a new one is used for next time. 449 // Make sure we don't have a handle to that one and that a new one is used for next time.
450 // This fixes an interesting 'gotcha'. If we call CollisionCollection.Clear() here, 450 // This fixes an interesting 'gotcha'. If we call CollisionCollection.Clear() here,
451 // a race condition is created for the other users of this instance. 451 // a race condition is created for the other users of this instance.
452 CollisionCollection = new CollisionEventUpdate(); 452 CollisionCollection = new CollisionEventUpdate();
453 } 453 }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 0d45579..7e2af78 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -420,7 +420,7 @@ public class BSPrim : BSPhysObject
420 get { return _mass; } 420 get { return _mass; }
421 } 421 }
422 // used when we only want this prim's mass and not the linkset thing 422 // used when we only want this prim's mass and not the linkset thing
423 public override float RawMass { 423 public override float RawMass {
424 get { return _mass; } 424 get { return _mass; }
425 } 425 }
426 // Set the physical mass to the passed mass. 426 // Set the physical mass to the passed mass.
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index bfc7ae7..5c58ad5 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -142,7 +142,7 @@ public abstract class BSShape
142 // If the shape was successfully created, nothing more to do 142 // If the shape was successfully created, nothing more to do
143 if (newShape.HasPhysicalShape) 143 if (newShape.HasPhysicalShape)
144 return newShape; 144 return newShape;
145 145
146 // VerifyMeshCreated is called after trying to create the mesh. If we think the asset had been 146 // VerifyMeshCreated is called after trying to create the mesh. If we think the asset had been
147 // fetched but we end up here again, the meshing of the asset must have failed. 147 // fetched but we end up here again, the meshing of the asset must have failed.
148 // Prevent trying to keep fetching the mesh by declaring failure. 148 // Prevent trying to keep fetching the mesh by declaring failure.
@@ -155,7 +155,7 @@ public abstract class BSShape
155 else 155 else
156 { 156 {
157 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset 157 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset
158 if (prim.BaseShape.SculptEntry 158 if (prim.BaseShape.SculptEntry
159 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Failed 159 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Failed
160 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Waiting 160 && prim.PrimAssetState != BSPhysObject.PrimAssetCondition.Waiting
161 && prim.BaseShape.SculptTexture != OMV.UUID.Zero 161 && prim.BaseShape.SculptTexture != OMV.UUID.Zero
@@ -164,7 +164,7 @@ public abstract class BSShape
164 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,fetchAsset", prim.LocalID); 164 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,fetchAsset", prim.LocalID);
165 // Multiple requestors will know we're waiting for this asset 165 // Multiple requestors will know we're waiting for this asset
166 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Waiting; 166 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Waiting;
167 167
168 BSPhysObject xprim = prim; 168 BSPhysObject xprim = prim;
169 Util.FireAndForget(delegate 169 Util.FireAndForget(delegate
170 { 170 {
@@ -245,8 +245,8 @@ public class BSShapeNative : BSShape
245 { 245 {
246 } 246 }
247 247
248 public static BSShape GetReference(BSScene physicsScene, BSPhysObject prim, 248 public static BSShape GetReference(BSScene physicsScene, BSPhysObject prim,
249 BSPhysicsShapeType shapeType, FixedShapeKey shapeKey) 249 BSPhysicsShapeType shapeType, FixedShapeKey shapeKey)
250 { 250 {
251 // Native shapes are not shared and are always built anew. 251 // Native shapes are not shared and are always built anew.
252 return new BSShapeNative(CreatePhysicalNativeShape(physicsScene, prim, shapeType, shapeKey)); 252 return new BSShapeNative(CreatePhysicalNativeShape(physicsScene, prim, shapeType, shapeKey));
@@ -379,7 +379,7 @@ public class BSShapeMesh : BSShape
379 { 379 {
380 BulletShape newShape = null; 380 BulletShape newShape = null;
381 381
382 IMesh meshData = physicsScene.mesher.CreateMesh(prim.PhysObjectName, pbs, size, lod, 382 IMesh meshData = physicsScene.mesher.CreateMesh(prim.PhysObjectName, pbs, size, lod,
383 false, // say it is not physical so a bounding box is not built 383 false, // say it is not physical so a bounding box is not built
384 false // do not cache the mesh and do not use previously built versions 384 false // do not cache the mesh and do not use previously built versions
385 ); 385 );
@@ -671,8 +671,8 @@ public class BSShapeCompound : BSShape
671 public BSShapeCompound(BulletShape pShape) : base(pShape) 671 public BSShapeCompound(BulletShape pShape) : base(pShape)
672 { 672 {
673 } 673 }
674 public static BSShape GetReference(BSScene physicsScene, BSPhysObject prim) 674 public static BSShape GetReference(BSScene physicsScene, BSPhysObject prim)
675 { 675 {
676 // Compound shapes are not shared so a new one is created every time. 676 // Compound shapes are not shared so a new one is created every time.
677 return new BSShapeCompound(CreatePhysicalCompoundShape(physicsScene, prim)); 677 return new BSShapeCompound(CreatePhysicalCompoundShape(physicsScene, prim));
678 } 678 }
@@ -750,8 +750,8 @@ public class BSShapeAvatar : BSShape
750 public BSShapeAvatar() : base() 750 public BSShapeAvatar() : base()
751 { 751 {
752 } 752 }
753 public static BSShape GetReference(BSPhysObject prim) 753 public static BSShape GetReference(BSPhysObject prim)
754 { 754 {
755 return new BSShapeNull(); 755 return new BSShapeNull();
756 } 756 }
757 public override void Dereference(BSScene physicsScene) { } 757 public override void Dereference(BSScene physicsScene) { }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
index 5a19797..c7deb4e 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs
@@ -68,7 +68,7 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
68 68
69 // This minCoords and maxCoords passed in give the size of the terrain (min and max Z 69 // This minCoords and maxCoords passed in give the size of the terrain (min and max Z
70 // are the high and low points of the heightmap). 70 // are the high and low points of the heightmap).
71 public BSTerrainHeightmap(BSScene physicsScene, Vector3 regionBase, uint id, float[] initialMap, 71 public BSTerrainHeightmap(BSScene physicsScene, Vector3 regionBase, uint id, float[] initialMap,
72 Vector3 minCoords, Vector3 maxCoords) 72 Vector3 minCoords, Vector3 maxCoords)
73 : base(physicsScene, regionBase, id) 73 : base(physicsScene, regionBase, id)
74 { 74 {
@@ -92,7 +92,7 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
92 private void BuildHeightmapTerrain() 92 private void BuildHeightmapTerrain()
93 { 93 {
94 // Create the terrain shape from the mapInfo 94 // Create the terrain shape from the mapInfo
95 m_mapInfo.terrainShape = m_physicsScene.PE.CreateTerrainShape( m_mapInfo.ID, 95 m_mapInfo.terrainShape = m_physicsScene.PE.CreateTerrainShape( m_mapInfo.ID,
96 new Vector3(m_mapInfo.sizeX, m_mapInfo.sizeY, 0), m_mapInfo.minZ, m_mapInfo.maxZ, 96 new Vector3(m_mapInfo.sizeX, m_mapInfo.sizeY, 0), m_mapInfo.minZ, m_mapInfo.maxZ,
97 m_mapInfo.heightMap, 1f, BSParam.TerrainCollisionMargin); 97 m_mapInfo.heightMap, 1f, BSParam.TerrainCollisionMargin);
98 98
@@ -103,7 +103,7 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys
103 centerPos.Y = m_mapInfo.minCoords.Y + (m_mapInfo.sizeY / 2f); 103 centerPos.Y = m_mapInfo.minCoords.Y + (m_mapInfo.sizeY / 2f);
104 centerPos.Z = m_mapInfo.minZ + ((m_mapInfo.maxZ - m_mapInfo.minZ) / 2f); 104 centerPos.Z = m_mapInfo.minZ + ((m_mapInfo.maxZ - m_mapInfo.minZ) / 2f);
105 105
106 m_mapInfo.terrainBody = m_physicsScene.PE.CreateBodyWithDefaultMotionState(m_mapInfo.terrainShape, 106 m_mapInfo.terrainBody = m_physicsScene.PE.CreateBodyWithDefaultMotionState(m_mapInfo.terrainShape,
107 m_mapInfo.ID, centerPos, Quaternion.Identity); 107 m_mapInfo.ID, centerPos, Quaternion.Identity);
108 108
109 // Set current terrain attributes 109 // Set current terrain attributes
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
index 0d16eda..c4807c4 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
@@ -135,7 +135,7 @@ public sealed class BSTerrainManager : IDisposable
135 DetailLog("{0},BSTerrainManager.CreateInitialGroundPlaneAndTerrain,region={1}", BSScene.DetailLogZero, m_physicsScene.RegionName); 135 DetailLog("{0},BSTerrainManager.CreateInitialGroundPlaneAndTerrain,region={1}", BSScene.DetailLogZero, m_physicsScene.RegionName);
136 // The ground plane is here to catch things that are trying to drop to negative infinity 136 // The ground plane is here to catch things that are trying to drop to negative infinity
137 BulletShape groundPlaneShape = m_physicsScene.PE.CreateGroundPlaneShape(BSScene.GROUNDPLANE_ID, 1f, BSParam.TerrainCollisionMargin); 137 BulletShape groundPlaneShape = m_physicsScene.PE.CreateGroundPlaneShape(BSScene.GROUNDPLANE_ID, 1f, BSParam.TerrainCollisionMargin);
138 m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape, 138 m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape,
139 BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity); 139 BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity);
140 140
141 m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane); 141 m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane);
@@ -318,8 +318,8 @@ public sealed class BSTerrainManager : IDisposable
318 // TODO: redo terrain implementation selection to allow other base types than heightMap. 318 // TODO: redo terrain implementation selection to allow other base types than heightMap.
319 private BSTerrainPhys BuildPhysicalTerrain(Vector3 terrainRegionBase, uint id, float[] heightMap, Vector3 minCoords, Vector3 maxCoords) 319 private BSTerrainPhys BuildPhysicalTerrain(Vector3 terrainRegionBase, uint id, float[] heightMap, Vector3 minCoords, Vector3 maxCoords)
320 { 320 {
321 m_physicsScene.Logger.DebugFormat("{0} Terrain for {1}/{2} created with {3}", 321 m_physicsScene.Logger.DebugFormat("{0} Terrain for {1}/{2} created with {3}",
322 LogHeader, m_physicsScene.RegionName, terrainRegionBase, 322 LogHeader, m_physicsScene.RegionName, terrainRegionBase,
323 (BSTerrainPhys.TerrainImplementation)BSParam.TerrainImplementation); 323 (BSTerrainPhys.TerrainImplementation)BSParam.TerrainImplementation);
324 BSTerrainPhys newTerrainPhys = null; 324 BSTerrainPhys newTerrainPhys = null;
325 switch ((int)BSParam.TerrainImplementation) 325 switch ((int)BSParam.TerrainImplementation)
@@ -334,8 +334,8 @@ public sealed class BSTerrainManager : IDisposable
334 break; 334 break;
335 default: 335 default:
336 m_physicsScene.Logger.ErrorFormat("{0} Bad terrain implementation specified. Type={1}/{2},Region={3}/{4}", 336 m_physicsScene.Logger.ErrorFormat("{0} Bad terrain implementation specified. Type={1}/{2},Region={3}/{4}",
337 LogHeader, 337 LogHeader,
338 (int)BSParam.TerrainImplementation, 338 (int)BSParam.TerrainImplementation,
339 BSParam.TerrainImplementation, 339 BSParam.TerrainImplementation,
340 m_physicsScene.RegionName, terrainRegionBase); 340 m_physicsScene.RegionName, terrainRegionBase);
341 break; 341 break;
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
index ee2a1f2..e4ca098 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs
@@ -51,7 +51,7 @@ public sealed class BSTerrainMesh : BSTerrainPhys
51 BulletShape m_terrainShape; 51 BulletShape m_terrainShape;
52 BulletBody m_terrainBody; 52 BulletBody m_terrainBody;
53 53
54 public BSTerrainMesh(BSScene physicsScene, Vector3 regionBase, uint id, Vector3 regionSize) 54 public BSTerrainMesh(BSScene physicsScene, Vector3 regionBase, uint id, Vector3 regionSize)
55 : base(physicsScene, regionBase, id) 55 : base(physicsScene, regionBase, id)
56 { 56 {
57 } 57 }
@@ -62,7 +62,7 @@ public sealed class BSTerrainMesh : BSTerrainPhys
62 } 62 }
63 63
64 // Create terrain mesh from a heightmap. 64 // Create terrain mesh from a heightmap.
65 public BSTerrainMesh(BSScene physicsScene, Vector3 regionBase, uint id, float[] initialMap, 65 public BSTerrainMesh(BSScene physicsScene, Vector3 regionBase, uint id, float[] initialMap,
66 Vector3 minCoords, Vector3 maxCoords) 66 Vector3 minCoords, Vector3 maxCoords)
67 : base(physicsScene, regionBase, id) 67 : base(physicsScene, regionBase, id)
68 { 68 {
@@ -104,7 +104,7 @@ public sealed class BSTerrainMesh : BSTerrainPhys
104 return; 104 return;
105 } 105 }
106 106
107 m_physicsScene.DetailLog("{0},BSTerrainMesh.create,meshed,id={1},indices={2},indSz={3},vertices={4},vertSz={5}", 107 m_physicsScene.DetailLog("{0},BSTerrainMesh.create,meshed,id={1},indices={2},indSz={3},vertices={4},vertSz={5}",
108 BSScene.DetailLogZero, ID, indicesCount, indices.Length, verticesCount, vertices.Length); 108 BSScene.DetailLogZero, ID, indicesCount, indices.Length, verticesCount, vertices.Length);
109 109
110 m_terrainShape = m_physicsScene.PE.CreateMeshShape(m_physicsScene.World, indicesCount, indices, verticesCount, vertices); 110 m_terrainShape = m_physicsScene.PE.CreateMeshShape(m_physicsScene.World, indicesCount, indices, verticesCount, vertices);
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
index 906e4f9..d5060e3 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs
@@ -224,42 +224,42 @@ public static class BulletSimData
224// 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
225// but, instead, use references to this dictionary. Finding and debugging 225// but, instead, use references to this dictionary. Finding and debugging
226// collision flag problems will be made easier. 226// collision flag problems will be made easier.
227public static Dictionary<CollisionType, CollisionTypeFilterGroup> CollisionTypeMasks 227public static Dictionary<CollisionType, CollisionTypeFilterGroup> CollisionTypeMasks
228 = new Dictionary<CollisionType, CollisionTypeFilterGroup>() 228 = new Dictionary<CollisionType, CollisionTypeFilterGroup>()
229{ 229{
230 { CollisionType.Avatar, 230 { CollisionType.Avatar,
231 new CollisionTypeFilterGroup(CollisionType.Avatar, 231 new CollisionTypeFilterGroup(CollisionType.Avatar,
232 (uint)CollisionFilterGroups.BCharacterGroup, 232 (uint)CollisionFilterGroups.BCharacterGroup,
233 (uint)CollisionFilterGroups.BAllGroup) 233 (uint)CollisionFilterGroups.BAllGroup)
234 }, 234 },
235 { CollisionType.Groundplane, 235 { CollisionType.Groundplane,
236 new CollisionTypeFilterGroup(CollisionType.Groundplane, 236 new CollisionTypeFilterGroup(CollisionType.Groundplane,
237 (uint)CollisionFilterGroups.BGroundPlaneGroup, 237 (uint)CollisionFilterGroups.BGroundPlaneGroup,
238 (uint)CollisionFilterGroups.BAllGroup) 238 (uint)CollisionFilterGroups.BAllGroup)
239 }, 239 },
240 { CollisionType.Terrain, 240 { CollisionType.Terrain,
241 new CollisionTypeFilterGroup(CollisionType.Terrain, 241 new CollisionTypeFilterGroup(CollisionType.Terrain,
242 (uint)CollisionFilterGroups.BTerrainGroup, 242 (uint)CollisionFilterGroups.BTerrainGroup,
243 (uint)(CollisionFilterGroups.BAllGroup & ~CollisionFilterGroups.BStaticGroup)) 243 (uint)(CollisionFilterGroups.BAllGroup & ~CollisionFilterGroups.BStaticGroup))
244 }, 244 },
245 { CollisionType.Static, 245 { CollisionType.Static,
246 new CollisionTypeFilterGroup(CollisionType.Static, 246 new CollisionTypeFilterGroup(CollisionType.Static,
247 (uint)CollisionFilterGroups.BStaticGroup, 247 (uint)CollisionFilterGroups.BStaticGroup,
248 (uint)(CollisionFilterGroups.BCharacterGroup | CollisionFilterGroups.BSolidGroup)) 248 (uint)(CollisionFilterGroups.BCharacterGroup | CollisionFilterGroups.BSolidGroup))
249 }, 249 },
250 { CollisionType.Dynamic, 250 { CollisionType.Dynamic,
251 new CollisionTypeFilterGroup(CollisionType.Dynamic, 251 new CollisionTypeFilterGroup(CollisionType.Dynamic,
252 (uint)CollisionFilterGroups.BSolidGroup, 252 (uint)CollisionFilterGroups.BSolidGroup,
253 (uint)(CollisionFilterGroups.BAllGroup)) 253 (uint)(CollisionFilterGroups.BAllGroup))
254 }, 254 },
255 { CollisionType.VolumeDetect, 255 { CollisionType.VolumeDetect,
256 new CollisionTypeFilterGroup(CollisionType.VolumeDetect, 256 new CollisionTypeFilterGroup(CollisionType.VolumeDetect,
257 (uint)CollisionFilterGroups.BSensorTrigger, 257 (uint)CollisionFilterGroups.BSensorTrigger,
258 (uint)(~CollisionFilterGroups.BSensorTrigger)) 258 (uint)(~CollisionFilterGroups.BSensorTrigger))
259 }, 259 },
260 { CollisionType.LinksetChild, 260 { CollisionType.LinksetChild,
261 new CollisionTypeFilterGroup(CollisionType.LinksetChild, 261 new CollisionTypeFilterGroup(CollisionType.LinksetChild,
262 (uint)CollisionFilterGroups.BLinksetChildGroup, 262 (uint)CollisionFilterGroups.BLinksetChildGroup,
263 (uint)(CollisionFilterGroups.BNoneGroup)) 263 (uint)(CollisionFilterGroups.BNoneGroup))
264 // (uint)(CollisionFilterGroups.BCharacterGroup | CollisionFilterGroups.BSolidGroup)) 264 // (uint)(CollisionFilterGroups.BCharacterGroup | CollisionFilterGroups.BSolidGroup))
265 }, 265 },