aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs71
1 files changed, 69 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index a2bbd3a..641e25d 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -183,11 +183,14 @@ namespace OpenSim.Region.Physics.Meshing
183 UInt16 profileEnd = primShape.ProfileEnd; 183 UInt16 profileEnd = primShape.ProfileEnd;
184 UInt16 taperX = primShape.PathScaleX; 184 UInt16 taperX = primShape.PathScaleX;
185 UInt16 taperY = primShape.PathScaleY; 185 UInt16 taperY = primShape.PathScaleY;
186 UInt16 pathShearX = primShape.PathShearX;
187 UInt16 pathShearY = primShape.PathShearY;
186 188
187 //m_log.Error("pathShear:" + primShape.PathShearX.ToString() + "," + primShape.PathShearY.ToString()); 189 //m_log.Error("pathShear:" + primShape.PathShearX.ToString() + "," + primShape.PathShearY.ToString());
188 //m_log.Error("pathTaper:" + primShape.PathTaperX.ToString() + "," + primShape.PathTaperY.ToString()); 190 //m_log.Error("pathTaper:" + primShape.PathTaperX.ToString() + "," + primShape.PathTaperY.ToString());
189 //m_log.Error("ProfileBegin:" + primShape.ProfileBegin.ToString() + "," + primShape.ProfileBegin.ToString()); 191 //m_log.Error("ProfileBegin:" + primShape.ProfileBegin.ToString() + "," + primShape.ProfileBegin.ToString());
190 //m_log.Error("PathScale:" + primShape.PathScaleX.ToString() + "," + primShape.PathScaleY.ToString()); 192 //m_log.Error("PathScale:" + primShape.PathScaleX.ToString() + "," + primShape.PathScaleY.ToString());
193
191 // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface 194 // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface
192 // of a block are basically the same 195 // of a block are basically the same
193 // They may be warped differently but the shape is identical 196 // They may be warped differently but the shape is identical
@@ -242,7 +245,7 @@ namespace OpenSim.Region.Physics.Meshing
242 // Calculated separately to avoid errors 245 // Calculated separately to avoid errors
243 cutHull.AddVertex(legEnd); 246 cutHull.AddVertex(legEnd);
244 247
245 m_log.Debug(String.Format("Starting cutting of the hollow shape from the prim {1}", 0, primName)); 248 //m_log.Debug(String.Format("Starting cutting of the hollow shape from the prim {1}", 0, primName));
246 SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); 249 SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull);
247 250
248 outerHull = cuttedHull; 251 outerHull = cuttedHull;
@@ -334,6 +337,37 @@ namespace OpenSim.Region.Physics.Meshing
334 } 337 }
335 } 338 }
336 339
340
341 if (pathShearX != 0)
342 {
343 if (pathShearX > 50) {
344 // Complimentary byte. Negative values wrap around the byte. Positive values go up to 50
345 extr.pushX = (((float)(256 - pathShearX) / 100) * -1f);
346 // m_log.Warn("pushX: " + extr.pushX);
347 }
348 else
349 {
350 extr.pushX = (float)pathShearX / 100;
351 // m_log.Warn("pushX: " + extr.pushX);
352 }
353 }
354
355 if (pathShearY != 0)
356 {
357 if (pathShearY > 50) {
358 // Complimentary byte. Negative values wrap around the byte. Positive values go up to 50
359 extr.pushY = (((float)(256 - pathShearY) / 100) * -1f);
360 //m_log.Warn("pushY: " + extr.pushY);
361 }
362 else
363 {
364 extr.pushY = (float)pathShearY / 100;
365 //m_log.Warn("pushY: " + extr.pushY);
366 }
367 }
368
369
370
337 Mesh result = extr.Extrude(m); 371 Mesh result = extr.Extrude(m);
338 result.DumpRaw(baseDir, primName, "Z extruded"); 372 result.DumpRaw(baseDir, primName, "Z extruded");
339 return result; 373 return result;
@@ -346,6 +380,9 @@ namespace OpenSim.Region.Physics.Meshing
346 UInt16 profileEnd = primShape.ProfileEnd; 380 UInt16 profileEnd = primShape.ProfileEnd;
347 UInt16 taperX = primShape.PathScaleX; 381 UInt16 taperX = primShape.PathScaleX;
348 UInt16 taperY = primShape.PathScaleY; 382 UInt16 taperY = primShape.PathScaleY;
383 UInt16 pathShearX = primShape.PathShearX;
384 UInt16 pathShearY = primShape.PathShearY;
385
349 // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface 386 // Procedure: This is based on the fact that the upper (plus) and lower (minus) Z-surface
350 // of a block are basically the same 387 // of a block are basically the same
351 // They may be warped differently but the shape is identical 388 // They may be warped differently but the shape is identical
@@ -653,7 +690,37 @@ namespace OpenSim.Region.Physics.Meshing
653 //m_log.Warn("taperBotFactorY: " + extr.taperBotFactorY.ToString()); 690 //m_log.Warn("taperBotFactorY: " + extr.taperBotFactorY.ToString());
654 } 691 }
655 } 692 }
656 693
694 if (pathShearX != 0)
695 {
696 if (pathShearX > 50)
697 {
698 // Complimentary byte. Negative values wrap around the byte. Positive values go up to 50
699 extr.pushX = (((float)(256 - pathShearX) / 100) * -1f);
700 //m_log.Warn("pushX: " + extr.pushX);
701 }
702 else
703 {
704 extr.pushX = (float)pathShearX / 100;
705 //m_log.Warn("pushX: " + extr.pushX);
706 }
707 }
708
709 if (pathShearY != 0)
710 {
711 if (pathShearY > 50)
712 {
713 // Complimentary byte. Negative values wrap around the byte. Positive values go up to 50
714 extr.pushY = (((float)(256 - pathShearY) / 100) * -1f);
715 //m_log.Warn("pushY: " + extr.pushY);
716 }
717 else
718 {
719 extr.pushY = (float)pathShearY / 100;
720 //m_log.Warn("pushY: " + extr.pushY);
721 }
722 }
723
657 Mesh result = extr.Extrude(m); 724 Mesh result = extr.Extrude(m);
658 result.DumpRaw(baseDir, primName, "Z extruded"); 725 result.DumpRaw(baseDir, primName, "Z extruded");
659 return result; 726 return result;