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.cs31
1 files changed, 21 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index bf953df..a610c8d 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -49,7 +49,8 @@ public struct ShapeData
49 SHAPE_CONE = 2, 49 SHAPE_CONE = 2,
50 SHAPE_CYLINDER = 3, 50 SHAPE_CYLINDER = 3,
51 SHAPE_SPHERE = 4, 51 SHAPE_SPHERE = 4,
52 SHAPE_HULL = 5 52 SHAPE_MESH = 5,
53 SHAPE_HULL = 6
53 }; 54 };
54 public uint ID; 55 public uint ID;
55 public PhysicsShapeType Type; 56 public PhysicsShapeType Type;
@@ -59,6 +60,7 @@ public struct ShapeData
59 public Vector3 Scale; 60 public Vector3 Scale;
60 public float Mass; 61 public float Mass;
61 public float Buoyancy; 62 public float Buoyancy;
63 public System.UInt64 HullKey;
62 public System.UInt64 MeshKey; 64 public System.UInt64 MeshKey;
63 public float Friction; 65 public float Friction;
64 public float Restitution; 66 public float Restitution;
@@ -158,20 +160,29 @@ public static extern void Shutdown(uint worldID);
158 160
159[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 161[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
160public static extern int PhysicsStep(uint worldID, float timeStep, int maxSubSteps, float fixedTimeStep, 162public static extern int PhysicsStep(uint worldID, float timeStep, int maxSubSteps, float fixedTimeStep,
161 out int updatedEntityCount, 163 out int updatedEntityCount,
162 out IntPtr updatedEntitiesPtr, 164 out IntPtr updatedEntitiesPtr,
163 out int collidersCount, 165 out int collidersCount,
164 out IntPtr collidersPtr); 166 out IntPtr collidersPtr);
165 167
166[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 168[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
167public static extern bool CreateHull(uint worldID, System.UInt64 meshKey, int hullCount, 169public static extern bool CreateHull(uint worldID, System.UInt64 meshKey,
168 [MarshalAs(UnmanagedType.LPArray)] float[] hulls 170 int hullCount, [MarshalAs(UnmanagedType.LPArray)] float[] hulls
171 );
172
173[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
174public static extern bool CreateMesh(uint worldID, System.UInt64 meshKey,
175 int indexCount, [MarshalAs(UnmanagedType.LPArray)] int[] indices,
176 int verticesCount, [MarshalAs(UnmanagedType.LPArray)] float[] vertices
169 ); 177 );
170 178
171[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 179[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
172public static extern bool DestroyHull(uint worldID, System.UInt64 meshKey); 180public static extern bool DestroyHull(uint worldID, System.UInt64 meshKey);
173 181
174[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 182[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
183public static extern bool DestroyMesh(uint worldID, System.UInt64 meshKey);
184
185[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
175public static extern bool CreateObject(uint worldID, ShapeData shapeData); 186public static extern bool CreateObject(uint worldID, ShapeData shapeData);
176 187
177[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 188[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
@@ -179,9 +190,9 @@ public static extern void CreateLinkset(uint worldID, int objectCount, ShapeData
179 190
180[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 191[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
181public static extern void AddConstraint(uint worldID, uint id1, uint id2, 192public static extern void AddConstraint(uint worldID, uint id1, uint id2,
182 Vector3 frame1, Quaternion frame1rot, 193 Vector3 frame1, Quaternion frame1rot,
183 Vector3 frame2, Quaternion frame2rot, 194 Vector3 frame2, Quaternion frame2rot,
184 Vector3 lowLinear, Vector3 hiLinear, Vector3 lowAngular, Vector3 hiAngular); 195 Vector3 lowLinear, Vector3 hiLinear, Vector3 lowAngular, Vector3 hiAngular);
185 196
186[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 197[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
187public static extern bool RemoveConstraintByID(uint worldID, uint id1); 198public static extern bool RemoveConstraintByID(uint worldID, uint id1);