From e7ad6ed3a3fda013cd393df6bb50236871092249 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 3 Aug 2012 14:44:07 -0700 Subject: BulletSim: pass collision subscription information to the C++ code so collisions on objects that don't care are not reported up. --- .../Region/Physics/BulletSPlugin/BulletSimAPI.cs | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs') 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 // Values used by Bullet and BulletSim to control collisions public enum CollisionFlags : uint { - STATIC_OBJECT = 1 << 0, - KINEMATIC_OBJECT = 1 << 1, - NO_CONTACT_RESPONSE = 1 << 2, - CUSTOM_MATERIAL_CALLBACK = 1 << 3, - CHARACTER_OBJECT = 1 << 4, - DISABLE_VISUALIZE_OBJECT = 1 << 5, - DISABLE_SPU_COLLISION_PROCESS = 1 << 6, + CF_STATIC_OBJECT = 1 << 0, + CF_KINEMATIC_OBJECT = 1 << 1, + CF_NO_CONTACT_RESPONSE = 1 << 2, + CF_CUSTOM_MATERIAL_CALLBACK = 1 << 3, + CF_CHARACTER_OBJECT = 1 << 4, + CF_DISABLE_VISUALIZE_OBJECT = 1 << 5, + CF_DISABLE_SPU_COLLISION_PROCESS = 1 << 6, // Following used by BulletSim to control collisions - VOLUME_DETECT_OBJECT = 1 << 10, - PHANTOM_OBJECT = 1 << 11, - PHYSICAL_OBJECT = 1 << 12, + BS_SUBSCRIBE_COLLISION_EVENTS = 1 << 10, + BS_VOLUME_DETECT_OBJECT = 1 << 11, + BS_PHANTOM_OBJECT = 1 << 12, + BS_PHYSICAL_OBJECT = 1 << 13, }; // 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); public static extern bool SetInterpolation2(IntPtr obj, Vector3 lin, Vector3 ang); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] -public static extern IntPtr SetCollisionFlags2(IntPtr obj, uint flags); +public static extern IntPtr SetCollisionFlags2(IntPtr obj, CollisionFlags flags); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] -public static extern IntPtr AddToCollisionFlags2(IntPtr obj, uint flags); +public static extern IntPtr AddToCollisionFlags2(IntPtr obj, CollisionFlags flags); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] -public static extern IntPtr RemoveFromCollisionFlags2(IntPtr obj, uint flags); +public static extern IntPtr RemoveFromCollisionFlags2(IntPtr obj, CollisionFlags flags); [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern bool SetMassProps2(IntPtr obj, float mass, Vector3 inertia); -- cgit v1.1