From d9572bdf4e97a82ef570b1153e422b66ea5085f7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 2 Sep 2016 11:55:59 +0100 Subject: ConvexDecomposition remove a copy of vertices not needed for ubOde --- .../PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs') diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs index 22691e6..72f2d6d 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs @@ -1094,7 +1094,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet return m; } - for (int i = m; i < count; i++) + for (int i = m + 1; i < count; i++) { if (allow[i] != 0) { @@ -1540,6 +1540,19 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet } } + public static bool ComputeHull(List vertices, out List indices) + { + List tris = new List(); + + bool ret = calchull(vertices, out indices, 0, tris); + if (ret == false) + { + indices = new List(); + return false; + } + return true; + } + private static bool CleanupVertices(List svertices, out List vertices, float normalepsilon, out float3 scale) { const float EPSILON = 0.000001f; -- cgit v1.1