aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/Meshing')
-rw-r--r--OpenSim/Region/Physics/Meshing/PrimMesher.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
index d0a09ff..f03aa7c 100644
--- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs
+++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
@@ -737,6 +737,7 @@ namespace OpenSim.Region.Physics.Meshing
737 float totalSkew = this.skew * 2.0f * pathLength; 737 float totalSkew = this.skew * 2.0f * pathLength;
738 float skewStart = this.pathCutBegin * 2.0f * this.skew - this.skew; 738 float skewStart = this.pathCutBegin * 2.0f * this.skew - this.skew;
739 float xOffsetTopShearXFactor = this.topShearX * (0.25f + 0.5f * (0.5f - this.holeSizeY)); 739 float xOffsetTopShearXFactor = this.topShearX * (0.25f + 0.5f * (0.5f - this.holeSizeY));
740 float yShearCompensation = 1.0f + Math.Abs(this.topShearY) * 0.25f;
740 741
741 // It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end 742 // It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end
742 // angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used 743 // angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used
@@ -825,9 +826,9 @@ namespace OpenSim.Region.Physics.Meshing
825 float xOffset = 0.5f * (skewStart + totalSkew * percentOfAngles); 826 float xOffset = 0.5f * (skewStart + totalSkew * percentOfAngles);
826 xOffset += (float)Math.Sin(angle) * xOffsetTopShearXFactor; 827 xOffset += (float)Math.Sin(angle) * xOffsetTopShearXFactor;
827 828
828 float yOffset = (float)Math.Cos(angle) * (0.5f - yPathScale) * radiusScale; 829 float yOffset = yShearCompensation * (float)Math.Cos(angle) * (0.5f - yPathScale) * radiusScale;
829 830
830 float zOffset = (float)Math.Sin(angle + this.topShearY * 0.9f) * (0.5f - yPathScale) * radiusScale; 831 float zOffset = (float)Math.Sin(angle + this.topShearY) * (0.5f - yPathScale) * radiusScale;
831 832
832 // next apply twist rotation to the profile layer 833 // next apply twist rotation to the profile layer
833 if (twistTotal != 0.0f || twistBegin != 0.0f) 834 if (twistTotal != 0.0f || twistBegin != 0.0f)
@@ -835,7 +836,8 @@ namespace OpenSim.Region.Physics.Meshing
835 836
836 // now orient the rotation of the profile layer relative to it's position on the path 837 // now orient the rotation of the profile layer relative to it's position on the path
837 // adding taperY to the angle used to generate the quat appears to approximate the viewer 838 // adding taperY to the angle used to generate the quat appears to approximate the viewer
838 newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY * 0.9f)); 839 //newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY * 0.9f));
840 newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY));
839 newLayer.AddPos(xOffset, yOffset, zOffset); 841 newLayer.AddPos(xOffset, yOffset, zOffset);
840 842
841 if (angle == startAngle) 843 if (angle == startAngle)