compensates profile placement effects of Y hole size on X top shear for circular path prim meshes

0.6.0-stable
Dahlia Trimble 2008-09-01 08:19:47 +00:00
parent 9cf9c08696
commit f4035840d2
1 changed files with 2 additions and 1 deletions

View File

@ -736,6 +736,7 @@ namespace OpenSim.Region.Physics.Meshing
float pathLength = this.pathCutEnd - this.pathCutBegin; float pathLength = this.pathCutEnd - this.pathCutBegin;
float totalSkew = this.skew * 2.0f * pathLength; float totalSkew = this.skew * 2.0f * pathLength;
float skewStart = this.pathCutBegin * 2.0f * this.skew - this.skew; 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 // 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 // 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 twist = twistBegin + twistTotal * percentOfPath;
float xOffset = 0.5f * (skewStart + totalSkew * percentOfAngles); 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 yOffset = (float)Math.Cos(angle) * (0.5f - yPathScale) * radiusScale;
float zOffset = (float)Math.Sin(angle + this.topShearY * 0.9f) * (0.5f - yPathScale) * radiusScale; float zOffset = (float)Math.Sin(angle + this.topShearY * 0.9f) * (0.5f - yPathScale) * radiusScale;