diff options
author | UbitUmarov | 2016-09-02 11:55:59 +0100 |
---|---|---|
committer | UbitUmarov | 2016-09-02 11:55:59 +0100 |
commit | d9572bdf4e97a82ef570b1153e422b66ea5085f7 (patch) | |
tree | c0640cad6a0fecfb65afcf8c89d2f09d7d5c7f5c /OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs | |
parent | ConvexDecomposition fix some incorrect convexhull mesh generation for ubOde (diff) | |
download | opensim-SC-d9572bdf4e97a82ef570b1153e422b66ea5085f7.zip opensim-SC-d9572bdf4e97a82ef570b1153e422b66ea5085f7.tar.gz opensim-SC-d9572bdf4e97a82ef570b1153e422b66ea5085f7.tar.bz2 opensim-SC-d9572bdf4e97a82ef570b1153e422b66ea5085f7.tar.xz |
ConvexDecomposition remove a copy of vertices not needed for ubOde
Diffstat (limited to '')
-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; |