diff options
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs | 15 |
1 files changed, 14 insertions, 1 deletions
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 | |||
1094 | return m; | 1094 | return m; |
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | for (int i = m; i < count; i++) | 1097 | for (int i = m + 1; i < count; i++) |
1098 | { | 1098 | { |
1099 | if (allow[i] != 0) | 1099 | if (allow[i] != 0) |
1100 | { | 1100 | { |
@@ -1540,6 +1540,19 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet | |||
1540 | } | 1540 | } |
1541 | } | 1541 | } |
1542 | 1542 | ||
1543 | public static bool ComputeHull(List<float3> vertices, out List<int> indices) | ||
1544 | { | ||
1545 | List<HullTriangle> tris = new List<HullTriangle>(); | ||
1546 | |||
1547 | bool ret = calchull(vertices, out indices, 0, tris); | ||
1548 | if (ret == false) | ||
1549 | { | ||
1550 | indices = new List<int>(); | ||
1551 | return false; | ||
1552 | } | ||
1553 | return true; | ||
1554 | } | ||
1555 | |||
1543 | private static bool CleanupVertices(List<float3> svertices, out List<float3> vertices, float normalepsilon, out float3 scale) | 1556 | private static bool CleanupVertices(List<float3> svertices, out List<float3> vertices, float normalepsilon, out float3 scale) |
1544 | { | 1557 | { |
1545 | const float EPSILON = 0.000001f; | 1558 | const float EPSILON = 0.000001f; |