aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index 819fce1..bf953df 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -51,9 +51,6 @@ public struct ShapeData
51 SHAPE_SPHERE = 4, 51 SHAPE_SPHERE = 4,
52 SHAPE_HULL = 5 52 SHAPE_HULL = 5
53 }; 53 };
54 // note that bools are passed as ints since bool size changes by language
55 public const int numericTrue = 1;
56 public const int numericFalse = 0;
57 public uint ID; 54 public uint ID;
58 public PhysicsShapeType Type; 55 public PhysicsShapeType Type;
59 public Vector3 Position; 56 public Vector3 Position;
@@ -67,6 +64,10 @@ public struct ShapeData
67 public float Restitution; 64 public float Restitution;
68 public int Collidable; 65 public int Collidable;
69 public int Static; // true if a static object. Otherwise gravity, etc. 66 public int Static; // true if a static object. Otherwise gravity, etc.
67
68 // note that bools are passed as ints since bool size changes by language and architecture
69 public const int numericTrue = 1;
70 public const int numericFalse = 0;
70} 71}
71[StructLayout(LayoutKind.Sequential)] 72[StructLayout(LayoutKind.Sequential)]
72public struct SweepHit 73public struct SweepHit
@@ -121,23 +122,34 @@ public struct ConfigurationParameters
121 public float ccdSweptSphereRadius; 122 public float ccdSweptSphereRadius;
122 123
123 public float terrainFriction; 124 public float terrainFriction;
124 public float terrainHitFriction; 125 public float terrainHitFraction;
125 public float terrainRestitution; 126 public float terrainRestitution;
126 public float avatarFriction; 127 public float avatarFriction;
127 public float avatarDensity; 128 public float avatarDensity;
128 public float avatarRestitution; 129 public float avatarRestitution;
129 public float avatarCapsuleRadius; 130 public float avatarCapsuleRadius;
130 public float avatarCapsuleHeight; 131 public float avatarCapsuleHeight;
132
133 public const float numericTrue = 1f;
134 public const float numericFalse = 0f;
131} 135}
132 136
133static class BulletSimAPI { 137static class BulletSimAPI {
134 138
135[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 139[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
140[return: MarshalAs(UnmanagedType.LPStr)]
141public static extern string GetVersion();
142
143[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
136public static extern uint Initialize(Vector3 maxPosition, IntPtr parms, 144public static extern uint Initialize(Vector3 maxPosition, IntPtr parms,
137 int maxCollisions, IntPtr collisionArray, 145 int maxCollisions, IntPtr collisionArray,
138 int maxUpdates, IntPtr updateArray); 146 int maxUpdates, IntPtr updateArray);
139 147
140[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 148[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
149public static extern bool UpdateParameter(uint worldID, uint localID,
150 [MarshalAs(UnmanagedType.LPStr)]string paramCode, float value);
151
152[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
141public static extern void SetHeightmap(uint worldID, [MarshalAs(UnmanagedType.LPArray)] float[] heightMap); 153public static extern void SetHeightmap(uint worldID, [MarshalAs(UnmanagedType.LPArray)] float[] heightMap);
142 154
143[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 155[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]