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.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]