aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
diff options
context:
space:
mode:
authorRobert Adams2012-08-03 14:44:07 -0700
committerRobert Adams2012-08-03 15:09:56 -0700
commite7ad6ed3a3fda013cd393df6bb50236871092249 (patch)
treedd8b6b28ae7226c28a8b3a07a893ea24ecb24fb8 /OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
parentBulletSim: Add AddObjectForce to BulletSim API. (diff)
downloadopensim-SC-e7ad6ed3a3fda013cd393df6bb50236871092249.zip
opensim-SC-e7ad6ed3a3fda013cd393df6bb50236871092249.tar.gz
opensim-SC-e7ad6ed3a3fda013cd393df6bb50236871092249.tar.bz2
opensim-SC-e7ad6ed3a3fda013cd393df6bb50236871092249.tar.xz
BulletSim: pass collision subscription information to the C++ code so collisions on objects that don't care are not reported up.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs27
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index 1881e41..4e05df6 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -179,17 +179,18 @@ public struct ConfigurationParameters
179// Values used by Bullet and BulletSim to control collisions 179// Values used by Bullet and BulletSim to control collisions
180public enum CollisionFlags : uint 180public enum CollisionFlags : uint
181{ 181{
182 STATIC_OBJECT = 1 << 0, 182 CF_STATIC_OBJECT = 1 << 0,
183 KINEMATIC_OBJECT = 1 << 1, 183 CF_KINEMATIC_OBJECT = 1 << 1,
184 NO_CONTACT_RESPONSE = 1 << 2, 184 CF_NO_CONTACT_RESPONSE = 1 << 2,
185 CUSTOM_MATERIAL_CALLBACK = 1 << 3, 185 CF_CUSTOM_MATERIAL_CALLBACK = 1 << 3,
186 CHARACTER_OBJECT = 1 << 4, 186 CF_CHARACTER_OBJECT = 1 << 4,
187 DISABLE_VISUALIZE_OBJECT = 1 << 5, 187 CF_DISABLE_VISUALIZE_OBJECT = 1 << 5,
188 DISABLE_SPU_COLLISION_PROCESS = 1 << 6, 188 CF_DISABLE_SPU_COLLISION_PROCESS = 1 << 6,
189 // Following used by BulletSim to control collisions 189 // Following used by BulletSim to control collisions
190 VOLUME_DETECT_OBJECT = 1 << 10, 190 BS_SUBSCRIBE_COLLISION_EVENTS = 1 << 10,
191 PHANTOM_OBJECT = 1 << 11, 191 BS_VOLUME_DETECT_OBJECT = 1 << 11,
192 PHYSICAL_OBJECT = 1 << 12, 192 BS_PHANTOM_OBJECT = 1 << 12,
193 BS_PHYSICAL_OBJECT = 1 << 13,
193}; 194};
194 195
195// CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0 196// CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0
@@ -481,13 +482,13 @@ public static extern bool SetLinearVelocity2(IntPtr obj, Vector3 val);
481public static extern bool SetInterpolation2(IntPtr obj, Vector3 lin, Vector3 ang); 482public static extern bool SetInterpolation2(IntPtr obj, Vector3 lin, Vector3 ang);
482 483
483[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 484[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
484public static extern IntPtr SetCollisionFlags2(IntPtr obj, uint flags); 485public static extern IntPtr SetCollisionFlags2(IntPtr obj, CollisionFlags flags);
485 486
486[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 487[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
487public static extern IntPtr AddToCollisionFlags2(IntPtr obj, uint flags); 488public static extern IntPtr AddToCollisionFlags2(IntPtr obj, CollisionFlags flags);
488 489
489[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 490[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
490public static extern IntPtr RemoveFromCollisionFlags2(IntPtr obj, uint flags); 491public static extern IntPtr RemoveFromCollisionFlags2(IntPtr obj, CollisionFlags flags);
491 492
492[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 493[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
493public static extern bool SetMassProps2(IntPtr obj, float mass, Vector3 inertia); 494public static extern bool SetMassProps2(IntPtr obj, float mass, Vector3 inertia);