From 17aef1c883aa81edba9a272e0a6897ad9a3a3983 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Mon, 1 Apr 2013 11:10:05 -0700 Subject: BulletSim: update unmanaged API for HACD parameter passing. Bullet HACD mesh to hull conversion calls in place but code not working. Update BulletSim DLLs and SOs for new API and HACD code. --- OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs index 5765b0d..d0d9f34 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs @@ -191,6 +191,21 @@ public struct ConfigurationParameters public const float numericFalse = 0f; } +// Parameters passed for the conversion of a mesh to a hull using Bullet's HACD library. +[StructLayout(LayoutKind.Sequential)] +public struct HACDParams +{ + // usual default values + public float maxVerticesPerHull; // 100 + public float minClusters; // 2 + public float compacityWeight; // 0.1 + public float volumeWeight; // 0.0 + public float concavity; // 100 + public float addExtraDistPoints; // false + public float addNeighboursDistPoints; // false + public float addFacesPoints; // false + public float shouldAdjustCollisionMargin; // false +} // The states a bullet collision object can have public enum ActivationState : uint @@ -308,7 +323,7 @@ public abstract BulletShape CreateMeshShape(BulletWorld world, public abstract BulletShape CreateHullShape(BulletWorld world, int hullCount, float[] hulls); -public abstract BulletShape BuildHullShapeFromMesh(BulletWorld world, BulletShape meshShape); +public abstract BulletShape BuildHullShapeFromMesh(BulletWorld world, BulletShape meshShape, HACDParams parms); public abstract BulletShape BuildNativeShape(BulletWorld world, ShapeData shapeData); -- cgit v1.1