aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/Extruder.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Extruder.cs26
1 files changed, 12 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs
index b14deeb..0c94669 100644
--- a/OpenSim/Region/Physics/Meshing/Extruder.cs
+++ b/OpenSim/Region/Physics/Meshing/Extruder.cs
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Physics.Meshing
286 // It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end 286 // It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end
287 // angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used 287 // angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used
288 // to calculate the sine for generating the path radius appears to approximate it's effects there 288 // to calculate the sine for generating the path radius appears to approximate it's effects there
289 // too, but there are some subtle differences in the radius which are noticeable as the prim size 289 // too, but there are some subtle differences in the radius which are noticeable as the prim size
290 // increases and it may affect megaprims quite a bit. The effect of the Y top shear parameter on 290 // increases and it may affect megaprims quite a bit. The effect of the Y top shear parameter on
291 // the meshes generated with this technique appear nearly identical in shape to the same prims when 291 // the meshes generated with this technique appear nearly identical in shape to the same prims when
292 // displayed by the viewer. 292 // displayed by the viewer.
@@ -369,28 +369,26 @@ namespace OpenSim.Region.Physics.Meshing
369 float yOffset; 369 float yOffset;
370 float zOffset; 370 float zOffset;
371 371
372
373 xOffset = 0.5f * (skewStart + totalSkew * (float)percentOfPath); 372 xOffset = 0.5f * (skewStart + totalSkew * (float)percentOfPath);
374 xOffset += (float) System.Math.Sin(angle) * pushX * 0.45f; 373 xOffset += (float) System.Math.Sin(angle) * pushX * 0.45f;
375 yOffset = (float)(System.Math.Cos(angle) * (0.5f - yPathScale)) * radiusScale; 374 yOffset = (float)(System.Math.Cos(angle) * (0.5f - yPathScale)) * radiusScale;
376 zOffset = (float)(System.Math.Sin(angle + pushY * 0.9f) * (0.5f - yPathScale)) * radiusScale; 375 zOffset = (float)(System.Math.Sin(angle + pushY * 0.9f) * (0.5f - yPathScale)) * radiusScale;
377 376
378 377 // next apply twist rotation to the profile layer
379 // next apply twist rotation to the profile layer 378 if (twistTotal != 0.0f || twistBot != 0.0f)
380 if (twistTotal != 0.0f || twistBot != 0.0f) 379 {
380 Quaternion profileRot = new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist);
381 foreach (Vertex v in newLayer.vertices)
381 { 382 {
382 Quaternion profileRot = new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist); 383 if (v != null)
383 foreach (Vertex v in newLayer.vertices)
384 { 384 {
385 if (v != null) 385 vTemp = v * profileRot;
386 { 386 v.X = vTemp.X;
387 vTemp = v * profileRot; 387 v.Y = vTemp.Y;
388 v.X = vTemp.X; 388 v.Z = vTemp.Z;
389 v.Y = vTemp.Y;
390 v.Z = vTemp.Z;
391 }
392 } 389 }
393 } 390 }
391 }
394 392
395 // now orient the rotation of the profile layer relative to it's position on the path 393 // now orient the rotation of the profile layer relative to it's position on the path
396 // adding pushY to the angle used to generate the quat appears to approximate the viewer 394 // adding pushY to the angle used to generate the quat appears to approximate the viewer