aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
diff options
context:
space:
mode:
authorRobert Adams2012-08-31 11:33:36 -0700
committerRobert Adams2012-08-31 11:41:33 -0700
commitffdc7987207de279116a077e2042ed3a1f381a5f (patch)
treebe0a30b79da8abf96ba826e370c62457658fda84 /OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
parentBulletSim: clean up some variable naming for consistancy. (diff)
downloadopensim-SC_OLD-ffdc7987207de279116a077e2042ed3a1f381a5f.zip
opensim-SC_OLD-ffdc7987207de279116a077e2042ed3a1f381a5f.tar.gz
opensim-SC_OLD-ffdc7987207de279116a077e2042ed3a1f381a5f.tar.bz2
opensim-SC_OLD-ffdc7987207de279116a077e2042ed3a1f381a5f.tar.xz
BulletSim: Update BulletSimAPI to match the DLL interface.
Major rework of terrain management which finally makes mega-regions work. Update heightmap of terrain by rebuilding the terrain's body and shape. There is a problem with just replacing the shape so this workaround will do for the moment but it will need to be resolved for mesh and hull switching.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index 804d2ea..a0bad3a 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -90,6 +90,8 @@ public class BulletHeightMapInfo
90 public Vector3 maxCoords; 90 public Vector3 maxCoords;
91 public float sizeX, sizeY; 91 public float sizeX, sizeY;
92 public float minZ, maxZ; 92 public float minZ, maxZ;
93 public BulletShape terrainShape;
94 public BulletBody terrainBody;
93} 95}
94 96
95// =============================================================================== 97// ===============================================================================
@@ -462,14 +464,14 @@ public static extern IntPtr CreateBodyFromShape2(IntPtr sim, IntPtr shape, Vecto
462public static extern IntPtr CreateBodyWithDefaultMotionState2(IntPtr shape, Vector3 pos, Quaternion rot); 464public static extern IntPtr CreateBodyWithDefaultMotionState2(IntPtr shape, Vector3 pos, Quaternion rot);
463 465
464[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 466[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
465public static extern bool ReplaceBodyShape2(IntPtr sim, IntPtr obj, IntPtr shape); 467public static extern bool SetBodyShape2(IntPtr sim, IntPtr obj, IntPtr shape);
466// ===================================================================================== 468// =====================================================================================
467[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 469[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
468public static extern IntPtr CreateHeightMapInfo2(uint id, Vector3 minCoords, Vector3 maxCoords, 470public static extern IntPtr CreateHeightMapInfo2(IntPtr sim, uint id, Vector3 minCoords, Vector3 maxCoords,
469 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin); 471 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin);
470 472
471[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 473[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
472public static extern IntPtr FillHeightMapInfo2(IntPtr mapInfo, uint id, Vector3 minCoords, Vector3 maxCoords, 474public static extern IntPtr FillHeightMapInfo2(IntPtr sim, IntPtr mapInfo, uint id, Vector3 minCoords, Vector3 maxCoords,
473 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin); 475 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin);
474 476
475[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 477[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]