diff options
author | Robert Adams | 2012-12-31 16:54:39 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-31 19:57:25 -0800 |
commit | 9396ccc078516023d63b5a86b3262ff97a1e97fb (patch) | |
tree | e02d28a4bf16a98625f359358f883e866f5339d4 /OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |
parent | BulletSim: complete movement of BulletSimAPI functions to BSAPITemplate. (diff) | |
download | opensim-SC-9396ccc078516023d63b5a86b3262ff97a1e97fb.zip opensim-SC-9396ccc078516023d63b5a86b3262ff97a1e97fb.tar.gz opensim-SC-9396ccc078516023d63b5a86b3262ff97a1e97fb.tar.bz2 opensim-SC-9396ccc078516023d63b5a86b3262ff97a1e97fb.tar.xz |
BulletSim: eliminate the use of the unmanaged HeightMapInfo structure.
Remove all related calls from the unmanaged and BSAPITemplate interfaces.
Update DLLs and SOs to include the version without HeightMapInfo structures.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | 26 |
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 | /* | ||
112 | public void SetHeightMap(BulletWorld world, float[] heightmap); | ||
113 | |||
114 | */ | ||
115 | public override int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep, | 111 | public 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 | /* | ||
280 | public override IntPtr CreateHeightMapInfo(BulletWorld sim, uint id, Vector3 minCoords, Vector3 maxCoords, | 277 | public 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 | ||
297 | public override BulletShape CreateGroundPlaneShape(uint id, float height, float collisionMargin) | 295 | public 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 | ||
302 | public override BulletShape CreateTerrainShape(IntPtr mapInfo) | 300 | public 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 | ||
980 | public override void DumpMapInfo(BulletWorld sim, BulletHMapInfo mapInfo) | ||
981 | { | ||
982 | BSAPICPP.DumpMapInfo2(sim.ptr, mapInfo.ptr); | ||
983 | } | ||
984 | |||
985 | public override void DumpConstraint(BulletWorld sim, BulletConstraint constrain) | 980 | public 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] |
1028 | public static extern void SetHeightMap2(IntPtr world, float[] heightmap); | ||
1029 | |||
1030 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1031 | public static extern int PhysicsStep2(IntPtr world, float timeStep, int maxSubSteps, float fixedTimeStep, | 1023 | public 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] |
1123 | public static extern IntPtr CreateHeightMapInfo2(IntPtr sim, uint id, Vector3 minCoords, Vector3 maxCoords, | 1116 | public 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] |
1131 | public static extern bool ReleaseHeightMapInfo2(IntPtr heightMapInfo); | 1124 | public static extern bool ReleaseHeightMapInfo2(IntPtr heightMapInfo); |
1125 | */ | ||
1132 | 1126 | ||
1133 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1127 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1134 | public static extern IntPtr CreateGroundPlaneShape2(uint id, float height, float collisionMargin); | 1128 | public 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] |
1137 | public static extern IntPtr CreateTerrainShape2(IntPtr mapInfo); | 1131 | public 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 |