aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CONTRIBUTORS.txt1
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs24
2 files changed, 22 insertions, 3 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index b7d9fe8..6441412 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -55,6 +55,7 @@ Patches
55* John R Sohn(XenReborn) 55* John R Sohn(XenReborn)
56* Xantor 56* Xantor
57* YZh 57* YZh
58* Dahlia
58 59
59 60
60LSL Devs 61LSL Devs
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index db91028..9c6dff4 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -331,11 +331,29 @@ namespace OpenSim.Region.Physics.Meshing
331 if (hshape == HollowShape.Triangle) 331 if (hshape == HollowShape.Triangle)
332 { 332 {
333 float hollowFactorF = (float)fhollowFactor / (float)50000; 333 float hollowFactorF = (float)fhollowFactor / (float)50000;
334 Vertex IMM = new Vertex(-0.25f * hollowFactorF, -0.45f * hollowFactorF, 0.0f); 334 Vertex IMM;
335 Vertex IPM = new Vertex(+0.5f * hollowFactorF, +0f * hollowFactorF, 0.0f); 335 Vertex IPM;
336 Vertex IPP = new Vertex(-0.25f * hollowFactorF, +0.45f * hollowFactorF, 0.0f); 336 Vertex IPP;
337 337
338 if (pshape == ProfileShape.Square)
339 {
340 // corner points are at 345, 105, and 225 degrees for the triangle within a box
341
342 //IMM = new Vertex(((float)Math.Cos(345.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, ((float)Math.Sin(345.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, 0.0f);
343 //IPM = new Vertex(((float)Math.Cos(105.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, ((float)Math.Sin(105.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, 0.0f);
344 //IPP = new Vertex(((float)Math.Cos(225.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, ((float)Math.Sin(225.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, 0.0f);
338 345
346 // hard coded here for speed, the equations are in the commented out lines above
347 IMM = new Vertex(0.48296f * hollowFactorF, -0.12941f * hollowFactorF, 0.0f);
348 IPM = new Vertex(-0.12941f * hollowFactorF, 0.48296f * hollowFactorF, 0.0f);
349 IPP = new Vertex(-0.35355f * hollowFactorF, -0.35355f * hollowFactorF, 0.0f);
350 }
351 else
352 {
353 IMM = new Vertex(-0.25f * hollowFactorF, -0.45f * hollowFactorF, 0.0f);
354 IPM = new Vertex(+0.5f * hollowFactorF, +0f * hollowFactorF, 0.0f);
355 IPP = new Vertex(-0.25f * hollowFactorF, +0.45f * hollowFactorF, 0.0f);
356 }
339 357
340 holeHull = new SimpleHull(); 358 holeHull = new SimpleHull();
341 359