aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing
diff options
context:
space:
mode:
authorDahlia Trimble2008-07-07 04:32:05 +0000
committerDahlia Trimble2008-07-07 04:32:05 +0000
commit063365c0dc841c20ed4f2fc876d1c6ec7d51739e (patch)
tree27334fb434dd343442528f3461f2240dc70a8f3a /OpenSim/Region/Physics/Meshing
parentdisables changes in r5356 until I have more time to do further characterization (diff)
downloadopensim-SC_OLD-063365c0dc841c20ed4f2fc876d1c6ec7d51739e.zip
opensim-SC_OLD-063365c0dc841c20ed4f2fc876d1c6ec7d51739e.tar.gz
opensim-SC_OLD-063365c0dc841c20ed4f2fc876d1c6ec7d51739e.tar.bz2
opensim-SC_OLD-063365c0dc841c20ed4f2fc876d1c6ec7d51739e.tar.xz
fix some Meshmerizer problem angles for sphere dimple and box path cut
Diffstat (limited to 'OpenSim/Region/Physics/Meshing')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 46e6843..95526f6 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -435,6 +435,12 @@ namespace OpenSim.Region.Physics.Meshing
435 // Int16 twistTop = primShape.PathTwistBegin; 435 // Int16 twistTop = primShape.PathTwistBegin;
436 // Int16 twistBot = primShape.PathTwist; 436 // Int16 twistBot = primShape.PathTwist;
437 437
438 // tweak problem cut angles
439 if (profileBegin > 23 && profileBegin % 50 == 0) profileBegin -= 23;
440 if (profileEnd > 23 && profileEnd % 50 == 0) profileEnd += 23;
441
442
443
438#if SPAM 444#if SPAM
439 reportPrimParams("[BOX] " + primName, primShape); 445 reportPrimParams("[BOX] " + primName, primShape);
440#endif 446#endif
@@ -1539,7 +1545,7 @@ namespace OpenSim.Region.Physics.Meshing
1539 && primShape.PathTwistBegin == 0 1545 && primShape.PathTwistBegin == 0
1540 && primShape.ProfileBegin == 0 1546 && primShape.ProfileBegin == 0
1541 && primShape.ProfileEnd == 0 1547 && primShape.ProfileEnd == 0
1542 && primShape.ProfileHollow == 0 1548 && hollowFactor == 0
1543 ) // simple sphere, revert to geodesic shape 1549 ) // simple sphere, revert to geodesic shape
1544 1550
1545 ) 1551 )
@@ -1550,6 +1556,12 @@ namespace OpenSim.Region.Physics.Meshing
1550 return CreateSphereMesh(primName, primShape, size); 1556 return CreateSphereMesh(primName, primShape, size);
1551 } 1557 }
1552 1558
1559 if (hollowFactor == 0)
1560 {
1561 // the hull triangulator is happier with a minimal hollow
1562 hollowFactor = 2000;
1563 }
1564
1553 if (hollowShape == HollowShape.Same) 1565 if (hollowShape == HollowShape.Same)
1554 hollowShape = HollowShape.Circle; 1566 hollowShape = HollowShape.Circle;
1555 1567
@@ -1582,7 +1594,6 @@ namespace OpenSim.Region.Physics.Meshing
1582 1594
1583 if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.HalfCircle) 1595 if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.HalfCircle)
1584 { // dimpled sphere uses profile cut but since it's a half circle the angles are smaller 1596 { // dimpled sphere uses profile cut but since it's a half circle the angles are smaller
1585 //if (hollowFactor == 0) hollowFactor = 1000; // bare minimum hollow to keep the triangulator happy
1586 fProfileBeginAngle = 0.0036f * (float)primShape.ProfileBegin; 1597 fProfileBeginAngle = 0.0036f * (float)primShape.ProfileBegin;
1587 fProfileEndAngle = 180.0f - 0.0036f * (float)primShape.ProfileEnd; 1598 fProfileEndAngle = 180.0f - 0.0036f * (float)primShape.ProfileEnd;
1588 if (fProfileBeginAngle < fProfileEndAngle) 1599 if (fProfileBeginAngle < fProfileEndAngle)
@@ -2084,8 +2095,8 @@ namespace OpenSim.Region.Physics.Meshing
2084 + "Name.............: " + name.ToString() + "\n" 2095 + "Name.............: " + name.ToString() + "\n"
2085 + "HollowShape......: " + primShape.HollowShape.ToString() + "\n" 2096 + "HollowShape......: " + primShape.HollowShape.ToString() + "\n"
2086 + "PathBegin........: " + primShape.PathBegin.ToString() + " " + pathBegin.ToString() + "\n" 2097 + "PathBegin........: " + primShape.PathBegin.ToString() + " " + pathBegin.ToString() + "\n"
2087 + "PathCurve........: " + primShape.PathCurve.ToString() + " " + pathEnd.ToString() + "\n" 2098 + "PathCurve........: " + primShape.PathCurve.ToString() + "\n"
2088 + "PathEnd..........: " + primShape.PathEnd.ToString() + "\n" 2099 + "PathEnd..........: " + primShape.PathEnd.ToString() + " " + pathEnd.ToString() + "\n"
2089 + "PathRadiusOffset.: " + primShape.PathRadiusOffset.ToString() + "\n" 2100 + "PathRadiusOffset.: " + primShape.PathRadiusOffset.ToString() + "\n"
2090 + "PathRevolutions..: " + primShape.PathRevolutions.ToString() + "\n" 2101 + "PathRevolutions..: " + primShape.PathRevolutions.ToString() + "\n"
2091 + "PathScaleX.......: " + primShape.PathScaleX.ToString() + "\n" 2102 + "PathScaleX.......: " + primShape.PathScaleX.ToString() + "\n"