aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2012-08-24 10:10:55 -0700
committerRobert Adams2012-08-31 11:41:07 -0700
commit0376b8ddbc4101627aa045a1deb18202fb51fffe (patch)
treebf12e007ac75b2d53400afae0775cf40b3017d6b /OpenSim
parentRemove the unused Newtonsoft.Json dlls (diff)
downloadopensim-SC_OLD-0376b8ddbc4101627aa045a1deb18202fb51fffe.zip
opensim-SC_OLD-0376b8ddbc4101627aa045a1deb18202fb51fffe.tar.gz
opensim-SC_OLD-0376b8ddbc4101627aa045a1deb18202fb51fffe.tar.bz2
opensim-SC_OLD-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.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs27
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]
393public static extern bool PushUpdate2(IntPtr obj); 393public static extern bool PushUpdate2(IntPtr obj);
394 394
395/* 395// =====================================================================================
396[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
397public 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]
402public 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]
397public static extern IntPtr CreateMesh2(IntPtr world, int indicesCount, int* indices, int verticesCount, float* vertices ); 406public static extern IntPtr BuildHullShape2(IntPtr world, IntPtr meshShape);
398 407
399[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 408[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
400public static extern bool BuildHull2(IntPtr world, IntPtr mesh); 409public 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]
403public static extern bool ReleaseHull2(IntPtr world, IntPtr mesh); 413public 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]
406public static extern bool DestroyMesh2(IntPtr world, IntPtr mesh); 417public 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]
409public static extern IntPtr CreateObject2(IntPtr world, ShapeData shapeData); 420public 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]
413public static extern IntPtr Create6DofConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, 426public static extern IntPtr Create6DofConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2,
414 Vector3 frame1loc, Quaternion frame1rot, 427 Vector3 frame1loc, Quaternion frame1rot,