aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
diff options
context:
space:
mode:
authorDahlia Trimble2008-06-25 07:17:36 +0000
committerDahlia Trimble2008-06-25 07:17:36 +0000
commitbc66a851d6628b6997a1a9dd95cb18facd0054dc (patch)
tree7fb39e57fdc2f47a656d68b3639779c76ed34f24 /OpenSim/Region/Physics/Meshing/Meshmerizer.cs
parentMantis#1590. Thank you, Melanie for a preserve type patch. (diff)
downloadopensim-SC_OLD-bc66a851d6628b6997a1a9dd95cb18facd0054dc.zip
opensim-SC_OLD-bc66a851d6628b6997a1a9dd95cb18facd0054dc.tar.gz
opensim-SC_OLD-bc66a851d6628b6997a1a9dd95cb18facd0054dc.tar.bz2
opensim-SC_OLD-bc66a851d6628b6997a1a9dd95cb18facd0054dc.tar.xz
Modifies box prim profile cut parameters to avoid angles which cause spurious triangles in mesh
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index c9be614..72c5d7f 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -475,9 +475,20 @@ namespace OpenSim.Region.Physics.Meshing
475 fProfileBeginAngle -= (90.0 + 45.0); // for some reasons, the SL client counts from the corner -X/-Y 475 fProfileBeginAngle -= (90.0 + 45.0); // for some reasons, the SL client counts from the corner -X/-Y
476 double fProfileEndAngle = 360.0 - profileEnd/50000.0*360.0; // Pathend comes as complement to 1.0 476 double fProfileEndAngle = 360.0 - profileEnd/50000.0*360.0; // Pathend comes as complement to 1.0
477 fProfileEndAngle -= (90.0 + 45.0); 477 fProfileEndAngle -= (90.0 + 45.0);
478
479 // avoid some problem angles until the hull subtraction routine is fixed
480 if ((fProfileBeginAngle + 45.0f) % 90.0f == 0.0f)
481 fProfileBeginAngle += 5.0f;
482 if ((fProfileEndAngle + 45.0f) % 90.0f == 0.0f)
483 fProfileEndAngle -= 5.0f;
484
478 if (fProfileBeginAngle < fProfileEndAngle) 485 if (fProfileBeginAngle < fProfileEndAngle)
479 fProfileEndAngle -= 360.0; 486 fProfileEndAngle -= 360.0;
480 487
488#if SPAM
489 Console.WriteLine("Meshmerizer: fProfileBeginAngle: " + fProfileBeginAngle.ToString() + " fProfileEndAngle: " + fProfileEndAngle.ToString());
490#endif
491
481 // Note, that we don't want to cut out a triangle, even if this is a 492 // Note, that we don't want to cut out a triangle, even if this is a
482 // good approximation for small cuts. Indeed we want to cut out an arc 493 // good approximation for small cuts. Indeed we want to cut out an arc
483 // and we approximate this arc by a polygon chain 494 // and we approximate this arc by a polygon chain