diff options
author | Robert Adams | 2012-08-24 10:10:55 -0700 |
---|---|---|
committer | Robert Adams | 2012-08-31 11:41:07 -0700 |
commit | 0376b8ddbc4101627aa045a1deb18202fb51fffe (patch) | |
tree | bf12e007ac75b2d53400afae0775cf40b3017d6b | |
parent | Remove the unused Newtonsoft.Json dlls (diff) | |
download | opensim-SC-0376b8ddbc4101627aa045a1deb18202fb51fffe.zip opensim-SC-0376b8ddbc4101627aa045a1deb18202fb51fffe.tar.gz opensim-SC-0376b8ddbc4101627aa045a1deb18202fb51fffe.tar.bz2 opensim-SC-0376b8ddbc4101627aa045a1deb18202fb51fffe.tar.xz |
BulletSim: add new interface for mesh, hull and terrain creation that will move nearly all of the logic into the C# code.
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index 504bd3c..dab2420 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |||
@@ -392,23 +392,36 @@ public static extern int PhysicsStep2(IntPtr world, float timeStep, int maxSubSt | |||
392 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 392 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
393 | public static extern bool PushUpdate2(IntPtr obj); | 393 | public static extern bool PushUpdate2(IntPtr obj); |
394 | 394 | ||
395 | /* | 395 | // ===================================================================================== |
396 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
397 | public static extern IntPtr CreateMeshShape2(IntPtr world, | ||
398 | int indicesCount, [MarshalAs(UnmanagedType.LPArray)] int[] indices, | ||
399 | int verticesCount, [MarshalAs(UnmanagedType.LPArray)] float[] vertices ); | ||
400 | |||
401 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
402 | public static extern IntPtr CreateHullShape2(IntPtr world, | ||
403 | int hullCount, [MarshalAs(UnmanagedType.LPArray)] float[] hulls); | ||
404 | |||
396 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 405 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
397 | public static extern IntPtr CreateMesh2(IntPtr world, int indicesCount, int* indices, int verticesCount, float* vertices ); | 406 | public static extern IntPtr BuildHullShape2(IntPtr world, IntPtr meshShape); |
398 | 407 | ||
399 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 408 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
400 | public static extern bool BuildHull2(IntPtr world, IntPtr mesh); | 409 | public static extern IntPtr BuildNativeShape2(IntPtr world, |
410 | float shapeType, float collisionMargin, Vector3 scale); | ||
401 | 411 | ||
402 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 412 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
403 | public static extern bool ReleaseHull2(IntPtr world, IntPtr mesh); | 413 | public static extern bool DeleteCollisionShape2(IntPtr world, IntPtr shape); |
404 | 414 | ||
415 | // ===================================================================================== | ||
405 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 416 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
406 | public static extern bool DestroyMesh2(IntPtr world, IntPtr mesh); | 417 | public static extern IntPtr CreateGroundPlaneBody2(uint id, Vector3 center, float collisionMargin); |
407 | 418 | ||
408 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 419 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
409 | public static extern IntPtr CreateObject2(IntPtr world, ShapeData shapeData); | 420 | public static extern IntPtr CreateTerrainBody2(uint id, |
410 | */ | 421 | Vector3 minCoords, Vector3 maxCoords, float collisionMargin, |
422 | [MarshalAs(UnmanagedType.LPArray)] float[] heightMap); | ||
411 | 423 | ||
424 | // ===================================================================================== | ||
412 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 425 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
413 | public static extern IntPtr Create6DofConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | 426 | public static extern IntPtr Create6DofConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, |
414 | Vector3 frame1loc, Quaternion frame1rot, | 427 | Vector3 frame1loc, Quaternion frame1rot, |