aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
diff options
context:
space:
mode:
authorRobert Adams2013-04-24 08:03:45 -0700
committerRobert Adams2013-04-24 08:03:45 -0700
commite324f6f3f0f8d894190cd7a9733687ac4308b2c1 (patch)
treeb3a546140bf5b16ece2d6ffaea38c5d491fecb96 /OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
parentBulletSim: improve avatar stair walking up. Add more parameters to control force (diff)
downloadopensim-SC_OLD-e324f6f3f0f8d894190cd7a9733687ac4308b2c1.zip
opensim-SC_OLD-e324f6f3f0f8d894190cd7a9733687ac4308b2c1.tar.gz
opensim-SC_OLD-e324f6f3f0f8d894190cd7a9733687ac4308b2c1.tar.bz2
opensim-SC_OLD-e324f6f3f0f8d894190cd7a9733687ac4308b2c1.tar.xz
BulletSim: update DLLs and SOs to they have no dependencies on newer
glibc (2.14) since that is not yet in some Linux distributions. Add unmanaged API calls and code for creating single convex hull shapes.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
index f5b84d4..fdf2cb9 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
@@ -268,6 +268,25 @@ public override BulletShape BuildHullShapeFromMesh(BulletWorld world, BulletShap
268 BSPhysicsShapeType.SHAPE_HULL); 268 BSPhysicsShapeType.SHAPE_HULL);
269} 269}
270 270
271public override BulletShape BuildConvexHullShapeFromMesh(BulletWorld world, BulletShape meshShape)
272{
273 BulletWorldUnman worldu = world as BulletWorldUnman;
274 BulletShapeUnman shapeu = meshShape as BulletShapeUnman;
275 return new BulletShapeUnman(
276 BSAPICPP.BuildConvexHullShapeFromMesh2(worldu.ptr, shapeu.ptr),
277 BSPhysicsShapeType.SHAPE_CONVEXHULL);
278}
279
280public override BulletShape CreateConvexHullShape(BulletWorld world,
281 int indicesCount, int[] indices,
282 int verticesCount, float[] vertices)
283{
284 BulletWorldUnman worldu = world as BulletWorldUnman;
285 return new BulletShapeUnman(
286 BSAPICPP.CreateConvexHullShape2(worldu.ptr, indicesCount, indices, verticesCount, vertices),
287 BSPhysicsShapeType.SHAPE_CONVEXHULL);
288}
289
271public override BulletShape BuildNativeShape(BulletWorld world, ShapeData shapeData) 290public override BulletShape BuildNativeShape(BulletWorld world, ShapeData shapeData)
272{ 291{
273 BulletWorldUnman worldu = world as BulletWorldUnman; 292 BulletWorldUnman worldu = world as BulletWorldUnman;
@@ -1414,6 +1433,14 @@ public static extern IntPtr CreateHullShape2(IntPtr world,
1414public static extern IntPtr BuildHullShapeFromMesh2(IntPtr world, IntPtr meshShape, HACDParams parms); 1433public static extern IntPtr BuildHullShapeFromMesh2(IntPtr world, IntPtr meshShape, HACDParams parms);
1415 1434
1416[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1435[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1436public static extern IntPtr BuildConvexHullShapeFromMesh2(IntPtr world, IntPtr meshShape);
1437
1438[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1439public static extern IntPtr CreateConvexHullShape2(IntPtr world,
1440 int indicesCount, [MarshalAs(UnmanagedType.LPArray)] int[] indices,
1441 int verticesCount, [MarshalAs(UnmanagedType.LPArray)] float[] vertices );
1442
1443[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1417public static extern IntPtr BuildNativeShape2(IntPtr world, ShapeData shapeData); 1444public static extern IntPtr BuildNativeShape2(IntPtr world, ShapeData shapeData);
1418 1445
1419[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1446[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]