diff options
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 48a1c0e..ce46dae 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -59,35 +59,36 @@ namespace OpenSim.Region.Physics.Meshing | |||
59 | // const string baseDir = "rawFiles"; | 59 | // const string baseDir = "rawFiles"; |
60 | private const string baseDir = null; //"rawFiles"; | 60 | private const string baseDir = null; //"rawFiles"; |
61 | 61 | ||
62 | private static void IntersectionParameterPD(PhysicsVector p1, PhysicsVector r1, PhysicsVector p2, | 62 | // TODO: unused |
63 | PhysicsVector r2, ref float lambda, ref float mu) | 63 | // private static void IntersectionParameterPD(PhysicsVector p1, PhysicsVector r1, PhysicsVector p2, |
64 | { | 64 | // PhysicsVector r2, ref float lambda, ref float mu) |
65 | // p1, p2, points on the straight | 65 | // { |
66 | // r1, r2, directional vectors of the straight. Not necessarily of length 1! | 66 | // // p1, p2, points on the straight |
67 | // note, that l, m can be scaled such, that the range 0..1 is mapped to the area between two points, | 67 | // // r1, r2, directional vectors of the straight. Not necessarily of length 1! |
68 | // thus allowing to decide whether an intersection is between two points | 68 | // // note, that l, m can be scaled such, that the range 0..1 is mapped to the area between two points, |
69 | 69 | // // thus allowing to decide whether an intersection is between two points | |
70 | float r1x = r1.X; | 70 | |
71 | float r1y = r1.Y; | 71 | // float r1x = r1.X; |
72 | float r2x = r2.X; | 72 | // float r1y = r1.Y; |
73 | float r2y = r2.Y; | 73 | // float r2x = r2.X; |
74 | 74 | // float r2y = r2.Y; | |
75 | float denom = r1y*r2x - r1x*r2y; | 75 | |
76 | 76 | // float denom = r1y*r2x - r1x*r2y; | |
77 | if (denom == 0.0) | 77 | |
78 | { | 78 | // if (denom == 0.0) |
79 | lambda = Single.NaN; | 79 | // { |
80 | mu = Single.NaN; | 80 | // lambda = Single.NaN; |
81 | return; | 81 | // mu = Single.NaN; |
82 | } | 82 | // return; |
83 | 83 | // } | |
84 | float p1x = p1.X; | 84 | |
85 | float p1y = p1.Y; | 85 | // float p1x = p1.X; |
86 | float p2x = p2.X; | 86 | // float p1y = p1.Y; |
87 | float p2y = p2.Y; | 87 | // float p2x = p2.X; |
88 | lambda = (-p2x*r2y + p1x*r2y + (p2y - p1y)*r2x)/denom; | 88 | // float p2y = p2.Y; |
89 | mu = (-p2x*r1y + p1x*r1y + (p2y - p1y)*r1x)/denom; | 89 | // lambda = (-p2x*r2y + p1x*r2y + (p2y - p1y)*r2x)/denom; |
90 | } | 90 | // mu = (-p2x*r1y + p1x*r1y + (p2y - p1y)*r1x)/denom; |
91 | // } | ||
91 | 92 | ||
92 | private static List<Triangle> FindInfluencedTriangles(List<Triangle> triangles, Vertex v) | 93 | private static List<Triangle> FindInfluencedTriangles(List<Triangle> triangles, Vertex v) |
93 | { | 94 | { |