diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs index 72f2d6d..cf7161a 100644 --- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs +++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs | |||
@@ -1,21 +1,21 @@ | |||
1 | /* The MIT License | 1 | /* The MIT License |
2 | * | 2 | * |
3 | * Copyright (c) 2010 Intel Corporation. | 3 | * Copyright (c) 2010 Intel Corporation. |
4 | * All rights reserved. | 4 | * All rights reserved. |
5 | * | 5 | * |
6 | * Based on the convexdecomposition library from | 6 | * Based on the convexdecomposition library from |
7 | * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. | 7 | * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. |
8 | * | 8 | * |
9 | * Permission is hereby granted, free of charge, to any person obtaining a copy | 9 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
10 | * of this software and associated documentation files (the "Software"), to deal | 10 | * of this software and associated documentation files (the "Software"), to deal |
11 | * in the Software without restriction, including without limitation the rights | 11 | * in the Software without restriction, including without limitation the rights |
12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | 12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
13 | * copies of the Software, and to permit persons to whom the Software is | 13 | * copies of the Software, and to permit persons to whom the Software is |
14 | * furnished to do so, subject to the following conditions: | 14 | * furnished to do so, subject to the following conditions: |
15 | * | 15 | * |
16 | * The above copyright notice and this permission notice shall be included in | 16 | * The above copyright notice and this permission notice shall be included in |
17 | * all copies or substantial portions of the Software. | 17 | * all copies or substantial portions of the Software. |
18 | * | 18 | * |
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
@@ -763,7 +763,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet | |||
763 | } | 763 | } |
764 | else if ((vertflag[edge0.v].planetest | vertflag[edge1.v].planetest) == (0)) | 764 | else if ((vertflag[edge0.v].planetest | vertflag[edge1.v].planetest) == (0)) |
765 | { | 765 | { |
766 | // both endpoints coplanar | 766 | // both endpoints coplanar |
767 | // must check a 3rd point to see if UNDER | 767 | // must check a 3rd point to see if UNDER |
768 | int e2 = e1 + 1; | 768 | int e2 = e1 + 1; |
769 | if (e2 >= convex.edges.Count || convex.edges[e2].p != currentplane) | 769 | if (e2 >= convex.edges.Count || convex.edges[e2].p != currentplane) |
@@ -792,7 +792,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet | |||
792 | } | 792 | } |
793 | else if (vertflag[edge0.v].planetest == (1) && vertflag[edge1.v].planetest == (2)) | 793 | else if (vertflag[edge0.v].planetest == (1) && vertflag[edge1.v].planetest == (2)) |
794 | { | 794 | { |
795 | // first is under 2nd is over | 795 | // first is under 2nd is over |
796 | 796 | ||
797 | edgeflag[e0].undermap = (short)under_edge_count; | 797 | edgeflag[e0].undermap = (short)under_edge_count; |
798 | tmpunderedges[under_edge_count].v = vertflag[edge0.v].undermap; | 798 | tmpunderedges[under_edge_count].v = vertflag[edge0.v].undermap; |
@@ -815,7 +815,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet | |||
815 | vout = vertcountunder++; | 815 | vout = vertcountunder++; |
816 | } | 816 | } |
817 | under_edge_count++; | 817 | under_edge_count++; |
818 | /// hmmm something to think about: i might be able to output this edge regarless of | 818 | /// hmmm something to think about: i might be able to output this edge regarless of |
819 | // wheter or not we know v-in yet. ok i;ll try this now: | 819 | // wheter or not we know v-in yet. ok i;ll try this now: |
820 | tmpunderedges[under_edge_count].v = (byte)vout; | 820 | tmpunderedges[under_edge_count].v = (byte)vout; |
821 | tmpunderedges[under_edge_count].p = (byte)underplanescount; | 821 | tmpunderedges[under_edge_count].p = (byte)underplanescount; |
@@ -834,7 +834,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet | |||
834 | } | 834 | } |
835 | else if (vertflag[edge0.v].planetest == (0) && vertflag[edge1.v].planetest == (2)) | 835 | else if (vertflag[edge0.v].planetest == (0) && vertflag[edge1.v].planetest == (2)) |
836 | { | 836 | { |
837 | // first is coplanar 2nd is over | 837 | // first is coplanar 2nd is over |
838 | 838 | ||
839 | edgeflag[e0].undermap = -1; | 839 | edgeflag[e0].undermap = -1; |
840 | vout = vertflag[edge0.v].undermap; | 840 | vout = vertflag[edge0.v].undermap; |
@@ -858,7 +858,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet | |||
858 | } | 858 | } |
859 | else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (1)) | 859 | else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (1)) |
860 | { | 860 | { |
861 | // first is over next is under | 861 | // first is over next is under |
862 | // new vertex!!! | 862 | // new vertex!!! |
863 | Debug.Assert(vin == -1); | 863 | Debug.Assert(vin == -1); |
864 | if (e0 < edge0.ea) | 864 | if (e0 < edge0.ea) |
@@ -901,7 +901,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet | |||
901 | } | 901 | } |
902 | else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (0)) | 902 | else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (0)) |
903 | { | 903 | { |
904 | // first is over next is coplanar | 904 | // first is over next is coplanar |
905 | 905 | ||
906 | edgeflag[e0].undermap = -1; | 906 | edgeflag[e0].undermap = -1; |
907 | vin = vertflag[edge1.v].undermap; | 907 | vin = vertflag[edge1.v].undermap; |
@@ -1543,7 +1543,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet | |||
1543 | public static bool ComputeHull(List<float3> vertices, out List<int> indices) | 1543 | public static bool ComputeHull(List<float3> vertices, out List<int> indices) |
1544 | { | 1544 | { |
1545 | List<HullTriangle> tris = new List<HullTriangle>(); | 1545 | List<HullTriangle> tris = new List<HullTriangle>(); |
1546 | 1546 | ||
1547 | bool ret = calchull(vertices, out indices, 0, tris); | 1547 | bool ret = calchull(vertices, out indices, 0, tris); |
1548 | if (ret == false) | 1548 | if (ret == false) |
1549 | { | 1549 | { |
@@ -1636,7 +1636,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet | |||
1636 | addPoint(ref vcount, vertices, x2, y2, z2); | 1636 | addPoint(ref vcount, vertices, x2, y2, z2); |
1637 | addPoint(ref vcount, vertices, x1, y2, z2); | 1637 | addPoint(ref vcount, vertices, x1, y2, z2); |
1638 | 1638 | ||
1639 | return true; // return cube | 1639 | return true; // return cube |
1640 | } | 1640 | } |
1641 | else | 1641 | else |
1642 | { | 1642 | { |