From f4035840d26ee7cdc7eea3dae0a52f22632aaaa0 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Mon, 1 Sep 2008 08:19:47 +0000 Subject: compensates profile placement effects of Y hole size on X top shear for circular path prim meshes --- OpenSim/Region/Physics/Meshing/PrimMesher.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index 26b3f02..d0a09ff 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs @@ -736,6 +736,7 @@ namespace OpenSim.Region.Physics.Meshing float pathLength = this.pathCutEnd - this.pathCutBegin; float totalSkew = this.skew * 2.0f * pathLength; float skewStart = this.pathCutBegin * 2.0f * this.skew - this.skew; + float xOffsetTopShearXFactor = this.topShearX * (0.25f + 0.5f * (0.5f - this.holeSizeY)); // It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end // angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used @@ -822,8 +823,8 @@ namespace OpenSim.Region.Physics.Meshing float twist = twistBegin + twistTotal * percentOfPath; float xOffset = 0.5f * (skewStart + totalSkew * percentOfAngles); + xOffset += (float)Math.Sin(angle) * xOffsetTopShearXFactor; - xOffset += (float)Math.Sin(angle) * this.topShearX * 0.225f; float yOffset = (float)Math.Cos(angle) * (0.5f - yPathScale) * radiusScale; float zOffset = (float)Math.Sin(angle + this.topShearY * 0.9f) * (0.5f - yPathScale) * radiusScale; -- cgit v1.1