aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs71
1 files changed, 37 insertions, 34 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index 1e003e6..a5acfd1 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -57,12 +57,12 @@ public struct BulletBody
57 { 57 {
58 ID = id; 58 ID = id;
59 ptr = xx; 59 ptr = xx;
60 collisionFilter = 0; 60 collisionGroup = 0;
61 collisionMask = 0; 61 collisionMask = 0;
62 } 62 }
63 public IntPtr ptr; 63 public IntPtr ptr;
64 public uint ID; 64 public uint ID;
65 public CollisionFilterGroups collisionFilter; 65 public CollisionFilterGroups collisionGroup;
66 public CollisionFilterGroups collisionMask; 66 public CollisionFilterGroups collisionMask;
67 public override string ToString() 67 public override string ToString()
68 { 68 {
@@ -71,10 +71,10 @@ public struct BulletBody
71 buff.Append(ID.ToString()); 71 buff.Append(ID.ToString());
72 buff.Append(",p="); 72 buff.Append(",p=");
73 buff.Append(ptr.ToString("X")); 73 buff.Append(ptr.ToString("X"));
74 if (collisionFilter != 0 || collisionMask != 0) 74 if (collisionGroup != 0 || collisionMask != 0)
75 { 75 {
76 buff.Append(",f="); 76 buff.Append(",g=");
77 buff.Append(collisionFilter.ToString("X")); 77 buff.Append(collisionGroup.ToString("X"));
78 buff.Append(",m="); 78 buff.Append(",m=");
79 buff.Append(collisionMask.ToString("X")); 79 buff.Append(collisionMask.ToString("X"));
80 } 80 }
@@ -376,36 +376,36 @@ public enum CollisionFilterGroups : uint
376 // Don't use the bit definitions!! Define the use in a 376 // Don't use the bit definitions!! Define the use in a
377 // filter/mask definition below. This way collision interactions 377 // filter/mask definition below. This way collision interactions
378 // are more easily debugged. 378 // are more easily debugged.
379 BNoneFilter = 0, 379 BNoneGroup = 0,
380 BDefaultFilter = 1 << 0, 380 BDefaultGroup = 1 << 0,
381 BStaticFilter = 1 << 1, 381 BStaticGroup = 1 << 1,
382 BKinematicFilter = 1 << 2, 382 BKinematicGroup = 1 << 2,
383 BDebrisFilter = 1 << 3, 383 BDebrisGroup = 1 << 3,
384 BSensorTrigger = 1 << 4, 384 BSensorTrigger = 1 << 4,
385 BCharacterFilter = 1 << 5, 385 BCharacterGroup = 1 << 5,
386 BAllFilter = 0xFFFFFFFF, 386 BAllGroup = 0xFFFFFFFF,
387 // Filter groups defined by BulletSim 387 // Filter groups defined by BulletSim
388 BGroundPlaneFilter = 1 << 10, 388 BGroundPlaneGroup = 1 << 10,
389 BTerrainFilter = 1 << 11, 389 BTerrainGroup = 1 << 11,
390 BRaycastFilter = 1 << 12, 390 BRaycastGroup = 1 << 12,
391 BSolidFilter = 1 << 13, 391 BSolidGroup = 1 << 13,
392 BLinksetFilter = 1 << 14, 392 BLinksetGroup = 1 << 14,
393 393
394 // The collsion filters and masked are defined in one place -- don't want them scattered 394 // The collsion filters and masked are defined in one place -- don't want them scattered
395 AvatarFilter = BCharacterFilter, 395 AvatarGroup = BCharacterGroup,
396 AvatarMask = BAllFilter, 396 AvatarMask = BAllGroup,
397 ObjectFilter = BSolidFilter, 397 ObjectGroup = BSolidGroup,
398 ObjectMask = BAllFilter, 398 ObjectMask = BAllGroup,
399 StaticObjectFilter = BStaticFilter, 399 StaticObjectGroup = BStaticGroup,
400 StaticObjectMask = BAllFilter & ~BStaticFilter, // static objects don't collide with each other 400 StaticObjectMask = AvatarGroup | ObjectGroup, // static things don't interact with much
401 LinksetFilter = BLinksetFilter, 401 LinksetGroup = BLinksetGroup,
402 LinksetMask = BAllFilter & ~BLinksetFilter, // linkset objects don't collide with each other 402 LinksetMask = BAllGroup & ~BLinksetGroup, // linkset objects don't collide with each other
403 VolumeDetectFilter = BSensorTrigger, 403 VolumeDetectGroup = BSensorTrigger,
404 VolumeDetectMask = ~BSensorTrigger, 404 VolumeDetectMask = ~BSensorTrigger,
405 TerrainFilter = BTerrainFilter, 405 TerrainGroup = BTerrainGroup,
406 TerrainMask = BAllFilter & ~BStaticFilter, // static objects on the ground don't collide 406 TerrainMask = BAllGroup & ~BStaticGroup, // static objects on the ground don't collide
407 GroundPlaneFilter = BGroundPlaneFilter, 407 GroundPlaneGroup = BGroundPlaneGroup,
408 GroundPlaneMask = BAllFilter 408 GroundPlaneMask = BAllGroup
409 409
410}; 410};
411 411
@@ -945,7 +945,7 @@ public static extern IntPtr GetConstraintRef2(IntPtr obj, int index);
945public static extern int GetNumConstraintRefs2(IntPtr obj); 945public static extern int GetNumConstraintRefs2(IntPtr obj);
946 946
947[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 947[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
948public static extern void SetCollisionFilterMask2(IntPtr body, uint filter, uint mask); 948public static extern bool SetCollisionGroupMask2(IntPtr body, uint filter, uint mask);
949 949
950// ===================================================================================== 950// =====================================================================================
951// btCollisionShape entries 951// btCollisionShape entries
@@ -1007,13 +1007,16 @@ public static extern void DumpRigidBody2(IntPtr sim, IntPtr collisionObject);
1007public static extern void DumpCollisionShape2(IntPtr sim, IntPtr collisionShape); 1007public static extern void DumpCollisionShape2(IntPtr sim, IntPtr collisionShape);
1008 1008
1009[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1009[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1010public static extern void DumpMapInfo2(IntPtr sim, IntPtr manInfo);
1011
1012[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1010public static extern void DumpConstraint2(IntPtr sim, IntPtr constrain); 1013public static extern void DumpConstraint2(IntPtr sim, IntPtr constrain);
1011 1014
1012[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1015[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1013public static extern void DumpAllInfo2(IntPtr sim); 1016public static extern void DumpActivationInfo2(IntPtr sim);
1014 1017
1015[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1018[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1016public static extern void DumpMapInfo2(IntPtr sim, IntPtr manInfo); 1019public static extern void DumpAllInfo2(IntPtr sim);
1017 1020
1018[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1021[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1019public static extern void DumpPhysicsStatistics2(IntPtr sim); 1022public static extern void DumpPhysicsStatistics2(IntPtr sim);