diff options
author | Robert Adams | 2012-12-31 17:06:47 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-31 19:57:25 -0800 |
commit | 6988b5ceaf6387198f0d23769adefdf572757c4a (patch) | |
tree | 8ad244531e945e369a8d6f5e31a5151e47a09da0 /OpenSim/Region | |
parent | BulletSim: eliminate the use of the unmanaged HeightMapInfo structure. (diff) | |
download | opensim-SC-6988b5ceaf6387198f0d23769adefdf572757c4a.zip opensim-SC-6988b5ceaf6387198f0d23769adefdf572757c4a.tar.gz opensim-SC-6988b5ceaf6387198f0d23769adefdf572757c4a.tar.bz2 opensim-SC-6988b5ceaf6387198f0d23769adefdf572757c4a.tar.xz |
BulletSim: remove rigid body contruction functions from BSAPITemplate that relied on prebuilt construction info structures.
Diffstat (limited to 'OpenSim/Region')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | 56 | ||||
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs | 5 |
2 files changed, 0 insertions, 61 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs index cf37e56..a06f6d0 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |||
@@ -226,11 +226,6 @@ public override BulletShape DuplicateCollisionShape(BulletWorld sim, BulletShape | |||
226 | return new BulletShape(BSAPICPP.DuplicateCollisionShape2(sim.ptr, srcShape.ptr, id), srcShape.type); | 226 | return new BulletShape(BSAPICPP.DuplicateCollisionShape2(sim.ptr, srcShape.ptr, id), srcShape.type); |
227 | } | 227 | } |
228 | 228 | ||
229 | public override BulletBody CreateBodyFromShapeAndInfo(BulletWorld sim, BulletShape shape, uint id, IntPtr constructionInfo) | ||
230 | { | ||
231 | return new BulletBody(id, BSAPICPP.CreateBodyFromShapeAndInfo2(sim.ptr, shape.ptr, id, constructionInfo)); | ||
232 | } | ||
233 | |||
234 | public override bool DeleteCollisionShape(BulletWorld world, BulletShape shape) | 229 | public override bool DeleteCollisionShape(BulletWorld world, BulletShape shape) |
235 | { | 230 | { |
236 | return BSAPICPP.DeleteCollisionShape2(world.ptr, shape.ptr); | 231 | return BSAPICPP.DeleteCollisionShape2(world.ptr, shape.ptr); |
@@ -256,16 +251,6 @@ public override BulletBody CreateGhostFromShape(BulletWorld sim, BulletShape sha | |||
256 | return new BulletBody(id, BSAPICPP.CreateGhostFromShape2(sim.ptr, shape.ptr, id, pos, rot)); | 251 | return new BulletBody(id, BSAPICPP.CreateGhostFromShape2(sim.ptr, shape.ptr, id, pos, rot)); |
257 | } | 252 | } |
258 | 253 | ||
259 | public override IntPtr AllocateBodyInfo(BulletBody obj) | ||
260 | { | ||
261 | return BSAPICPP.AllocateBodyInfo2(obj.ptr); | ||
262 | } | ||
263 | |||
264 | public override void ReleaseBodyInfo(IntPtr obj) | ||
265 | { | ||
266 | BSAPICPP.ReleaseBodyInfo2(obj); | ||
267 | } | ||
268 | |||
269 | public override void DestroyObject(BulletWorld sim, BulletBody obj) | 254 | public override void DestroyObject(BulletWorld sim, BulletBody obj) |
270 | { | 255 | { |
271 | BSAPICPP.DestroyObject2(sim.ptr, obj.ptr); | 256 | BSAPICPP.DestroyObject2(sim.ptr, obj.ptr); |
@@ -273,25 +258,6 @@ public override void DestroyObject(BulletWorld sim, BulletBody obj) | |||
273 | 258 | ||
274 | // ===================================================================================== | 259 | // ===================================================================================== |
275 | // Terrain creation and helper routines | 260 | // Terrain creation and helper routines |
276 | /* | ||
277 | public override IntPtr CreateHeightMapInfo(BulletWorld sim, uint id, Vector3 minCoords, Vector3 maxCoords, | ||
278 | float[] heightMap, float collisionMargin) | ||
279 | { | ||
280 | return BSAPICPP.CreateHeightMapInfo2(sim.ptr, id, minCoords, maxCoords, heightMap, collisionMargin); | ||
281 | } | ||
282 | |||
283 | public override IntPtr FillHeightMapInfo(BulletWorld sim, IntPtr mapInfo, uint id, Vector3 minCoords, Vector3 maxCoords, | ||
284 | float[] heightMap, float collisionMargin) | ||
285 | { | ||
286 | return BSAPICPP.FillHeightMapInfo2(sim.ptr, mapInfo, id, minCoords, maxCoords, heightMap, collisionMargin); | ||
287 | } | ||
288 | |||
289 | public override bool ReleaseHeightMapInfo(IntPtr heightMapInfo) | ||
290 | { | ||
291 | return BSAPICPP.ReleaseHeightMapInfo2(heightMapInfo); | ||
292 | } | ||
293 | */ | ||
294 | |||
295 | public override BulletShape CreateGroundPlaneShape(uint id, float height, float collisionMargin) | 261 | public override BulletShape CreateGroundPlaneShape(uint id, float height, float collisionMargin) |
296 | { | 262 | { |
297 | return new BulletShape(BSAPICPP.CreateGroundPlaneShape2(id, height, collisionMargin), BSPhysicsShapeType.SHAPE_GROUNDPLANE); | 263 | return new BulletShape(BSAPICPP.CreateGroundPlaneShape2(id, height, collisionMargin), BSPhysicsShapeType.SHAPE_GROUNDPLANE); |
@@ -1083,9 +1049,6 @@ public static extern void RecalculateCompoundShapeLocalAabb2(IntPtr cShape); | |||
1083 | public static extern IntPtr DuplicateCollisionShape2(IntPtr sim, IntPtr srcShape, uint id); | 1049 | public static extern IntPtr DuplicateCollisionShape2(IntPtr sim, IntPtr srcShape, uint id); |
1084 | 1050 | ||
1085 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1051 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1086 | public static extern IntPtr CreateBodyFromShapeAndInfo2(IntPtr sim, IntPtr shape, uint id, IntPtr constructionInfo); | ||
1087 | |||
1088 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1089 | public static extern bool DeleteCollisionShape2(IntPtr world, IntPtr shape); | 1052 | public static extern bool DeleteCollisionShape2(IntPtr world, IntPtr shape); |
1090 | 1053 | ||
1091 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1054 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
@@ -1101,29 +1064,10 @@ public static extern IntPtr CreateBodyWithDefaultMotionState2(IntPtr shape, uint | |||
1101 | public static extern IntPtr CreateGhostFromShape2(IntPtr sim, IntPtr shape, uint id, Vector3 pos, Quaternion rot); | 1064 | public static extern IntPtr CreateGhostFromShape2(IntPtr sim, IntPtr shape, uint id, Vector3 pos, Quaternion rot); |
1102 | 1065 | ||
1103 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1066 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1104 | public static extern IntPtr AllocateBodyInfo2(IntPtr obj); | ||
1105 | |||
1106 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1107 | public static extern void ReleaseBodyInfo2(IntPtr obj); | ||
1108 | |||
1109 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1110 | public static extern void DestroyObject2(IntPtr sim, IntPtr obj); | 1067 | public static extern void DestroyObject2(IntPtr sim, IntPtr obj); |
1111 | 1068 | ||
1112 | // ===================================================================================== | 1069 | // ===================================================================================== |
1113 | // Terrain creation and helper routines | 1070 | // Terrain creation and helper routines |
1114 | /* | ||
1115 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1116 | public static extern IntPtr CreateHeightMapInfo2(IntPtr sim, uint id, Vector3 minCoords, Vector3 maxCoords, | ||
1117 | [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin); | ||
1118 | |||
1119 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1120 | public static extern IntPtr FillHeightMapInfo2(IntPtr sim, IntPtr mapInfo, uint id, Vector3 minCoords, Vector3 maxCoords, | ||
1121 | [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin); | ||
1122 | |||
1123 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1124 | public static extern bool ReleaseHeightMapInfo2(IntPtr heightMapInfo); | ||
1125 | */ | ||
1126 | |||
1127 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1071 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1128 | public static extern IntPtr CreateGroundPlaneShape2(uint id, float height, float collisionMargin); | 1072 | public static extern IntPtr CreateGroundPlaneShape2(uint id, float height, float collisionMargin); |
1129 | 1073 | ||
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs index a618a21..6e67c7a 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs | |||
@@ -346,7 +346,6 @@ public abstract void RecalculateCompoundShapeLocalAabb(BulletShape cShape); | |||
346 | 346 | ||
347 | public abstract BulletShape DuplicateCollisionShape(BulletWorld sim, BulletShape srcShape, uint id); | 347 | public abstract BulletShape DuplicateCollisionShape(BulletWorld sim, BulletShape srcShape, uint id); |
348 | 348 | ||
349 | public abstract BulletBody CreateBodyFromShapeAndInfo(BulletWorld sim, BulletShape shape, uint id, IntPtr constructionInfo); | ||
350 | 349 | ||
351 | public abstract bool DeleteCollisionShape(BulletWorld world, BulletShape shape); | 350 | public abstract bool DeleteCollisionShape(BulletWorld world, BulletShape shape); |
352 | 351 | ||
@@ -358,10 +357,6 @@ public abstract BulletBody CreateBodyWithDefaultMotionState(BulletShape shape, u | |||
358 | 357 | ||
359 | public abstract BulletBody CreateGhostFromShape(BulletWorld sim, BulletShape shape, uint id, Vector3 pos, Quaternion rot); | 358 | public abstract BulletBody CreateGhostFromShape(BulletWorld sim, BulletShape shape, uint id, Vector3 pos, Quaternion rot); |
360 | 359 | ||
361 | public abstract IntPtr AllocateBodyInfo(BulletBody obj); | ||
362 | |||
363 | public abstract void ReleaseBodyInfo(IntPtr obj); | ||
364 | |||
365 | public abstract void DestroyObject(BulletWorld sim, BulletBody obj); | 360 | public abstract void DestroyObject(BulletWorld sim, BulletBody obj); |
366 | 361 | ||
367 | // ===================================================================================== | 362 | // ===================================================================================== |