aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs26
1 files changed, 11 insertions, 15 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
index 0355b94..cf37e56 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
@@ -108,10 +108,6 @@ private void BulletLoggerPhysLog(string msg)
108 PhysicsScene.DetailLog("[BULLETS UNMANAGED]:" + msg); 108 PhysicsScene.DetailLog("[BULLETS UNMANAGED]:" + msg);
109} 109}
110 110
111 /*
112public void SetHeightMap(BulletWorld world, float[] heightmap);
113
114 */
115public override int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep, 111public override int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep,
116 out int updatedEntityCount, out int collidersCount) 112 out int updatedEntityCount, out int collidersCount)
117{ 113{
@@ -277,6 +273,7 @@ public override void DestroyObject(BulletWorld sim, BulletBody obj)
277 273
278// ===================================================================================== 274// =====================================================================================
279// Terrain creation and helper routines 275// Terrain creation and helper routines
276 /*
280public override IntPtr CreateHeightMapInfo(BulletWorld sim, uint id, Vector3 minCoords, Vector3 maxCoords, 277public override IntPtr CreateHeightMapInfo(BulletWorld sim, uint id, Vector3 minCoords, Vector3 maxCoords,
281 float[] heightMap, float collisionMargin) 278 float[] heightMap, float collisionMargin)
282{ 279{
@@ -293,15 +290,18 @@ public override bool ReleaseHeightMapInfo(IntPtr heightMapInfo)
293{ 290{
294 return BSAPICPP.ReleaseHeightMapInfo2(heightMapInfo); 291 return BSAPICPP.ReleaseHeightMapInfo2(heightMapInfo);
295} 292}
293 */
296 294
297public override BulletShape CreateGroundPlaneShape(uint id, float height, float collisionMargin) 295public override BulletShape CreateGroundPlaneShape(uint id, float height, float collisionMargin)
298{ 296{
299 return new BulletShape(BSAPICPP.CreateGroundPlaneShape2(id, height, collisionMargin), BSPhysicsShapeType.SHAPE_GROUNDPLANE); 297 return new BulletShape(BSAPICPP.CreateGroundPlaneShape2(id, height, collisionMargin), BSPhysicsShapeType.SHAPE_GROUNDPLANE);
300} 298}
301 299
302public override BulletShape CreateTerrainShape(IntPtr mapInfo) 300public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight, float[] heightMap,
301 float scaleFactor, float collisionMargin)
303{ 302{
304 return new BulletShape(BSAPICPP.CreateTerrainShape2(mapInfo), BSPhysicsShapeType.SHAPE_TERRAIN); 303 return new BulletShape(BSAPICPP.CreateTerrainShape2(id, size, minHeight, maxHeight, heightMap, scaleFactor, collisionMargin),
304 BSPhysicsShapeType.SHAPE_TERRAIN);
305} 305}
306 306
307// ===================================================================================== 307// =====================================================================================
@@ -977,11 +977,6 @@ public override void DumpCollisionShape(BulletWorld sim, BulletShape collisionSh
977 BSAPICPP.DumpCollisionShape2(sim.ptr, collisionShape.ptr); 977 BSAPICPP.DumpCollisionShape2(sim.ptr, collisionShape.ptr);
978} 978}
979 979
980public override void DumpMapInfo(BulletWorld sim, BulletHMapInfo mapInfo)
981{
982 BSAPICPP.DumpMapInfo2(sim.ptr, mapInfo.ptr);
983}
984
985public override void DumpConstraint(BulletWorld sim, BulletConstraint constrain) 980public override void DumpConstraint(BulletWorld sim, BulletConstraint constrain)
986{ 981{
987 BSAPICPP.DumpConstraint2(sim.ptr, constrain.ptr); 982 BSAPICPP.DumpConstraint2(sim.ptr, constrain.ptr);
@@ -1025,9 +1020,6 @@ public static extern IntPtr Initialize2(Vector3 maxPosition, IntPtr parms,
1025 DebugLogCallback logRoutine); 1020 DebugLogCallback logRoutine);
1026 1021
1027[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1022[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1028public static extern void SetHeightMap2(IntPtr world, float[] heightmap);
1029
1030[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1031public static extern int PhysicsStep2(IntPtr world, float timeStep, int maxSubSteps, float fixedTimeStep, 1023public static extern int PhysicsStep2(IntPtr world, float timeStep, int maxSubSteps, float fixedTimeStep,
1032 out int updatedEntityCount, out int collidersCount); 1024 out int updatedEntityCount, out int collidersCount);
1033 1025
@@ -1119,6 +1111,7 @@ public static extern void DestroyObject2(IntPtr sim, IntPtr obj);
1119 1111
1120// ===================================================================================== 1112// =====================================================================================
1121// Terrain creation and helper routines 1113// Terrain creation and helper routines
1114 /*
1122[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1115[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1123public static extern IntPtr CreateHeightMapInfo2(IntPtr sim, uint id, Vector3 minCoords, Vector3 maxCoords, 1116public static extern IntPtr CreateHeightMapInfo2(IntPtr sim, uint id, Vector3 minCoords, Vector3 maxCoords,
1124 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin); 1117 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin);
@@ -1129,12 +1122,15 @@ public static extern IntPtr FillHeightMapInfo2(IntPtr sim, IntPtr mapInfo, uint
1129 1122
1130[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1123[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1131public static extern bool ReleaseHeightMapInfo2(IntPtr heightMapInfo); 1124public static extern bool ReleaseHeightMapInfo2(IntPtr heightMapInfo);
1125 */
1132 1126
1133[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1127[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1134public static extern IntPtr CreateGroundPlaneShape2(uint id, float height, float collisionMargin); 1128public static extern IntPtr CreateGroundPlaneShape2(uint id, float height, float collisionMargin);
1135 1129
1136[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1130[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1137public static extern IntPtr CreateTerrainShape2(IntPtr mapInfo); 1131public static extern IntPtr CreateTerrainShape2(uint id, Vector3 size, float minHeight, float maxHeight,
1132 [MarshalAs(UnmanagedType.LPArray)] float[] heightMap,
1133 float scaleFactor, float collisionMargin);
1138 1134
1139// ===================================================================================== 1135// =====================================================================================
1140// Constraint creation and helper routines 1136// Constraint creation and helper routines