aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs22
1 files changed, 19 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
index 8c6e7d6..45ecf56 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
@@ -530,12 +530,12 @@ public override void SetForceUpdateAllAabbs(BulletWorld world, bool force)
530// btDynamicsWorld entries 530// btDynamicsWorld entries
531public override bool AddObjectToWorld(BulletWorld world, BulletBody obj) 531public override bool AddObjectToWorld(BulletWorld world, BulletBody obj)
532{ 532{
533 // Bullet resets several variables when an object is added to the world.
534 // Gravity is reset to world default depending on the static/dynamic
535 // type. Of course, the collision flags in the broadphase proxy are initialized to default.
536 BulletWorldUnman worldu = world as BulletWorldUnman; 533 BulletWorldUnman worldu = world as BulletWorldUnman;
537 BulletBodyUnman bodyu = obj as BulletBodyUnman; 534 BulletBodyUnman bodyu = obj as BulletBodyUnman;
538 535
536 // Bullet resets several variables when an object is added to the world.
537 // Gravity is reset to world default depending on the static/dynamic
538 // type. Of course, the collision flags in the broadphase proxy are initialized to default.
539 Vector3 origGrav = BSAPICPP.GetGravity2(bodyu.ptr); 539 Vector3 origGrav = BSAPICPP.GetGravity2(bodyu.ptr);
540 540
541 bool ret = BSAPICPP.AddObjectToWorld2(worldu.ptr, bodyu.ptr); 541 bool ret = BSAPICPP.AddObjectToWorld2(worldu.ptr, bodyu.ptr);
@@ -1259,6 +1259,16 @@ public override void DumpPhysicsStatistics(BulletWorld world)
1259 BulletWorldUnman worldu = world as BulletWorldUnman; 1259 BulletWorldUnman worldu = world as BulletWorldUnman;
1260 BSAPICPP.DumpPhysicsStatistics2(worldu.ptr); 1260 BSAPICPP.DumpPhysicsStatistics2(worldu.ptr);
1261} 1261}
1262public override void ResetBroadphasePool(BulletWorld world)
1263{
1264 BulletWorldUnman worldu = world as BulletWorldUnman;
1265 BSAPICPP.ResetBroadphasePool(worldu.ptr);
1266}
1267public override void ResetConstraintSolver(BulletWorld world)
1268{
1269 BulletWorldUnman worldu = world as BulletWorldUnman;
1270 BSAPICPP.ResetConstraintSolver(worldu.ptr);
1271}
1262 1272
1263// ===================================================================================== 1273// =====================================================================================
1264// ===================================================================================== 1274// =====================================================================================
@@ -1832,6 +1842,12 @@ public static extern void DumpAllInfo2(IntPtr sim);
1832[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1842[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1833public static extern void DumpPhysicsStatistics2(IntPtr sim); 1843public static extern void DumpPhysicsStatistics2(IntPtr sim);
1834 1844
1845[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1846public static extern void ResetBroadphasePool(IntPtr sim);
1847
1848[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1849public static extern void ResetConstraintSolver(IntPtr sim);
1850
1835} 1851}
1836 1852
1837} 1853}