aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRobert Adams2012-12-31 17:06:47 -0800
committerRobert Adams2012-12-31 19:57:25 -0800
commit6988b5ceaf6387198f0d23769adefdf572757c4a (patch)
tree8ad244531e945e369a8d6f5e31a5151e47a09da0
parentBulletSim: eliminate the use of the unmanaged HeightMapInfo structure. (diff)
downloadopensim-SC_OLD-6988b5ceaf6387198f0d23769adefdf572757c4a.zip
opensim-SC_OLD-6988b5ceaf6387198f0d23769adefdf572757c4a.tar.gz
opensim-SC_OLD-6988b5ceaf6387198f0d23769adefdf572757c4a.tar.bz2
opensim-SC_OLD-6988b5ceaf6387198f0d23769adefdf572757c4a.tar.xz
BulletSim: remove rigid body contruction functions from BSAPITemplate that relied on prebuilt construction info structures.
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs56
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs5
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
229public 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
234public override bool DeleteCollisionShape(BulletWorld world, BulletShape shape) 229public 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
259public override IntPtr AllocateBodyInfo(BulletBody obj)
260{
261 return BSAPICPP.AllocateBodyInfo2(obj.ptr);
262}
263
264public override void ReleaseBodyInfo(IntPtr obj)
265{
266 BSAPICPP.ReleaseBodyInfo2(obj);
267}
268
269public override void DestroyObject(BulletWorld sim, BulletBody obj) 254public 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 /*
277public 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
283public 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
289public override bool ReleaseHeightMapInfo(IntPtr heightMapInfo)
290{
291 return BSAPICPP.ReleaseHeightMapInfo2(heightMapInfo);
292}
293 */
294
295public override BulletShape CreateGroundPlaneShape(uint id, float height, float collisionMargin) 261public 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);
1083public static extern IntPtr DuplicateCollisionShape2(IntPtr sim, IntPtr srcShape, uint id); 1049public 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]
1086public static extern IntPtr CreateBodyFromShapeAndInfo2(IntPtr sim, IntPtr shape, uint id, IntPtr constructionInfo);
1087
1088[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1089public static extern bool DeleteCollisionShape2(IntPtr world, IntPtr shape); 1052public 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
1101public static extern IntPtr CreateGhostFromShape2(IntPtr sim, IntPtr shape, uint id, Vector3 pos, Quaternion rot); 1064public 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]
1104public static extern IntPtr AllocateBodyInfo2(IntPtr obj);
1105
1106[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1107public static extern void ReleaseBodyInfo2(IntPtr obj);
1108
1109[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1110public static extern void DestroyObject2(IntPtr sim, IntPtr obj); 1067public 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]
1116public 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]
1120public 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]
1124public static extern bool ReleaseHeightMapInfo2(IntPtr heightMapInfo);
1125 */
1126
1127[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1071[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1128public static extern IntPtr CreateGroundPlaneShape2(uint id, float height, float collisionMargin); 1072public 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
347public abstract BulletShape DuplicateCollisionShape(BulletWorld sim, BulletShape srcShape, uint id); 347public abstract BulletShape DuplicateCollisionShape(BulletWorld sim, BulletShape srcShape, uint id);
348 348
349public abstract BulletBody CreateBodyFromShapeAndInfo(BulletWorld sim, BulletShape shape, uint id, IntPtr constructionInfo);
350 349
351public abstract bool DeleteCollisionShape(BulletWorld world, BulletShape shape); 350public abstract bool DeleteCollisionShape(BulletWorld world, BulletShape shape);
352 351
@@ -358,10 +357,6 @@ public abstract BulletBody CreateBodyWithDefaultMotionState(BulletShape shape, u
358 357
359public abstract BulletBody CreateGhostFromShape(BulletWorld sim, BulletShape shape, uint id, Vector3 pos, Quaternion rot); 358public abstract BulletBody CreateGhostFromShape(BulletWorld sim, BulletShape shape, uint id, Vector3 pos, Quaternion rot);
360 359
361public abstract IntPtr AllocateBodyInfo(BulletBody obj);
362
363public abstract void ReleaseBodyInfo(IntPtr obj);
364
365public abstract void DestroyObject(BulletWorld sim, BulletBody obj); 360public abstract void DestroyObject(BulletWorld sim, BulletBody obj);
366 361
367// ===================================================================================== 362// =====================================================================================