diff options
author | Robert Adams | 2013-09-10 17:32:01 -0700 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-09-20 21:04:03 +0100 |
commit | 568ff6fddc60d7cc86f3c568f349c00aafdf15fd (patch) | |
tree | 600ec04e21f42a1252f4151dee847ccd55d9f0d1 /OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |
parent | BulletSim: update DLLs and SOs for spring parameters and constraint (diff) | |
download | opensim-SC_OLD-568ff6fddc60d7cc86f3c568f349c00aafdf15fd.zip opensim-SC_OLD-568ff6fddc60d7cc86f3c568f349c00aafdf15fd.tar.gz opensim-SC_OLD-568ff6fddc60d7cc86f3c568f349c00aafdf15fd.tar.bz2 opensim-SC_OLD-568ff6fddc60d7cc86f3c568f349c00aafdf15fd.tar.xz |
BulletSim: add ClearCollisionProxyCache function to API.
Add proxy cache clearing when some properties are changed. This fixes
a problem where objects would stop colliding of they were moved
with setPosition mulitple times.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs index 8dfb01c..3bd81d4 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |||
@@ -725,6 +725,13 @@ public override bool RemoveObjectFromWorld(BulletWorld world, BulletBody obj) | |||
725 | return BSAPICPP.RemoveObjectFromWorld2(worldu.ptr, bodyu.ptr); | 725 | return BSAPICPP.RemoveObjectFromWorld2(worldu.ptr, bodyu.ptr); |
726 | } | 726 | } |
727 | 727 | ||
728 | public override bool ClearCollisionProxyCache(BulletWorld world, BulletBody obj) | ||
729 | { | ||
730 | BulletWorldUnman worldu = world as BulletWorldUnman; | ||
731 | BulletBodyUnman bodyu = obj as BulletBodyUnman; | ||
732 | return BSAPICPP.ClearCollisionProxyCache2(worldu.ptr, bodyu.ptr); | ||
733 | } | ||
734 | |||
728 | public override bool AddConstraintToWorld(BulletWorld world, BulletConstraint constrain, bool disableCollisionsBetweenLinkedObjects) | 735 | public override bool AddConstraintToWorld(BulletWorld world, BulletConstraint constrain, bool disableCollisionsBetweenLinkedObjects) |
729 | { | 736 | { |
730 | BulletWorldUnman worldu = world as BulletWorldUnman; | 737 | BulletWorldUnman worldu = world as BulletWorldUnman; |
@@ -1713,6 +1720,9 @@ public static extern bool AddObjectToWorld2(IntPtr world, IntPtr obj); | |||
1713 | public static extern bool RemoveObjectFromWorld2(IntPtr world, IntPtr obj); | 1720 | public static extern bool RemoveObjectFromWorld2(IntPtr world, IntPtr obj); |
1714 | 1721 | ||
1715 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1722 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1723 | public static extern bool ClearCollisionProxyCache2(IntPtr world, IntPtr obj); | ||
1724 | |||
1725 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1716 | public static extern bool AddConstraintToWorld2(IntPtr world, IntPtr constrain, bool disableCollisionsBetweenLinkedObjects); | 1726 | public static extern bool AddConstraintToWorld2(IntPtr world, IntPtr constrain, bool disableCollisionsBetweenLinkedObjects); |
1717 | 1727 | ||
1718 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1728 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |