aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
diff options
context:
space:
mode:
authorDiva Canto2013-04-24 12:46:23 -0700
committerDiva Canto2013-04-24 12:46:23 -0700
commit1868680848f7b96a85173449b3b7a016229c3c21 (patch)
tree6a1727fc06699198bc4b65c85c798f23c6440fbc /OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs
parentBug fix: compare tolower. This should fix the issue where HG visitors current... (diff)
parentBulletSim: partial addition of BSShape class code preparing for (diff)
downloadopensim-SC-1868680848f7b96a85173449b3b7a016229c3c21.zip
opensim-SC-1868680848f7b96a85173449b3b7a016229c3c21.tar.gz
opensim-SC-1868680848f7b96a85173449b3b7a016229c3c21.tar.bz2
opensim-SC-1868680848f7b96a85173449b3b7a016229c3c21.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
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]