diff options
author | Dahlia Trimble | 2008-07-02 17:08:52 +0000 |
---|---|---|
committer | Dahlia Trimble | 2008-07-02 17:08:52 +0000 |
commit | 13d6615263e34c95fd1e4944fefc74dad5912a56 (patch) | |
tree | 21dfa0864a0fff9c305fec85d2e8b8a0d634af05 /OpenSim/Region/Physics/Meshing | |
parent | * elminate now pointless inv type fields from OpenSim library xml (diff) | |
download | opensim-SC-13d6615263e34c95fd1e4944fefc74dad5912a56.zip opensim-SC-13d6615263e34c95fd1e4944fefc74dad5912a56.tar.gz opensim-SC-13d6615263e34c95fd1e4944fefc74dad5912a56.tar.bz2 opensim-SC-13d6615263e34c95fd1e4944fefc74dad5912a56.tar.xz |
Adds experimental Meshmerizer support for "prim torture" effects of sphere dimple on prim types box, cylinder, and prism
Diffstat (limited to 'OpenSim/Region/Physics/Meshing')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Extruder.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 19 |
2 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs index ac8d81c..77bd9a4 100644 --- a/OpenSim/Region/Physics/Meshing/Extruder.cs +++ b/OpenSim/Region/Physics/Meshing/Extruder.cs | |||
@@ -303,7 +303,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
303 | System.Console.WriteLine("Extruder: PathScaleX: " + pathScaleX.ToString() + " pathScaleY: " + pathScaleY.ToString()); | 303 | System.Console.WriteLine("Extruder: PathScaleX: " + pathScaleX.ToString() + " pathScaleY: " + pathScaleY.ToString()); |
304 | #endif | 304 | #endif |
305 | 305 | ||
306 | float percentOfPath = 0.0f; | 306 | //float percentOfPath = 0.0f; |
307 | float percentOfPath = (float)pathBegin * 2.0e-5f; | ||
308 | zOffset += percentOfPath; | ||
307 | bool done = false; | 309 | bool done = false; |
308 | do // loop through the length of the path and add the layers | 310 | do // loop through the length of the path and add the layers |
309 | { | 311 | { |
@@ -409,6 +411,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
409 | xOffset += xOffsetStepIncrement; | 411 | xOffset += xOffsetStepIncrement; |
410 | yOffset += yOffsetStepIncrement; | 412 | yOffset += yOffsetStepIncrement; |
411 | zOffset += stepSize; | 413 | zOffset += stepSize; |
414 | |||
415 | if (percentOfPath > 1.0f - (float)pathEnd * 2.0e-5f) | ||
416 | done = true; | ||
412 | } | 417 | } |
413 | else done = true; | 418 | else done = true; |
414 | 419 | ||
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index b67d94e..b506c8f 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -664,6 +664,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
664 | 664 | ||
665 | extr.twistTop = (float)primShape.PathTwist * (float)Math.PI * 0.01f; | 665 | extr.twistTop = (float)primShape.PathTwist * (float)Math.PI * 0.01f; |
666 | extr.twistBot = (float)primShape.PathTwistBegin * (float)Math.PI * 0.01f; | 666 | extr.twistBot = (float)primShape.PathTwistBegin * (float)Math.PI * 0.01f; |
667 | extr.pathBegin = primShape.PathBegin; | ||
668 | extr.pathEnd = primShape.PathEnd; | ||
667 | 669 | ||
668 | //Mesh result = extr.Extrude(m); | 670 | //Mesh result = extr.Extrude(m); |
669 | Mesh result = extr.ExtrudeLinearPath(m); | 671 | Mesh result = extr.ExtrudeLinearPath(m); |
@@ -1016,6 +1018,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
1016 | 1018 | ||
1017 | extr.twistTop = (float)primShape.PathTwist * (float)Math.PI * 0.01f; | 1019 | extr.twistTop = (float)primShape.PathTwist * (float)Math.PI * 0.01f; |
1018 | extr.twistBot = (float)primShape.PathTwistBegin * (float)Math.PI * 0.01f; | 1020 | extr.twistBot = (float)primShape.PathTwistBegin * (float)Math.PI * 0.01f; |
1021 | extr.pathBegin = primShape.PathBegin; | ||
1022 | extr.pathEnd = primShape.PathEnd; | ||
1019 | 1023 | ||
1020 | //System.Console.WriteLine("[MESH]: twistTop = " + twistTop.ToString() + "|" + extr.twistTop.ToString() + ", twistMid = " + twistMid.ToString() + "|" + extr.twistMid.ToString() + ", twistbot = " + twistBot.ToString() + "|" + extr.twistBot.ToString()); | 1024 | //System.Console.WriteLine("[MESH]: twistTop = " + twistTop.ToString() + "|" + extr.twistTop.ToString() + ", twistMid = " + twistMid.ToString() + "|" + extr.twistMid.ToString() + ", twistbot = " + twistBot.ToString() + "|" + extr.twistBot.ToString()); |
1021 | //Mesh result = extr.Extrude(m); | 1025 | //Mesh result = extr.Extrude(m); |
@@ -1260,6 +1264,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
1260 | 1264 | ||
1261 | extr.twistTop = (float)primShape.PathTwist * (float)Math.PI * 0.01f; | 1265 | extr.twistTop = (float)primShape.PathTwist * (float)Math.PI * 0.01f; |
1262 | extr.twistBot = (float)primShape.PathTwistBegin * (float)Math.PI * 0.01f; | 1266 | extr.twistBot = (float)primShape.PathTwistBegin * (float)Math.PI * 0.01f; |
1267 | extr.pathBegin = primShape.PathBegin; | ||
1268 | extr.pathEnd = primShape.PathEnd; | ||
1263 | 1269 | ||
1264 | //System.Console.WriteLine("[MESH]: twistTop = " + twistTop.ToString() + "|" + extr.twistTop.ToString() + ", twistMid = " + twistMid.ToString() + "|" + extr.twistMid.ToString() + ", twistbot = " + twistBot.ToString() + "|" + extr.twistBot.ToString()); | 1270 | //System.Console.WriteLine("[MESH]: twistTop = " + twistTop.ToString() + "|" + extr.twistTop.ToString() + ", twistMid = " + twistMid.ToString() + "|" + extr.twistMid.ToString() + ", twistbot = " + twistBot.ToString() + "|" + extr.twistBot.ToString()); |
1265 | //Mesh result = extr.Extrude(m); | 1271 | //Mesh result = extr.Extrude(m); |
@@ -2059,12 +2065,17 @@ namespace OpenSim.Region.Physics.Meshing | |||
2059 | 2065 | ||
2060 | float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f; | 2066 | float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f; |
2061 | float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; | 2067 | float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; |
2068 | float pathBegin = (float)primShape.PathBegin * 2.0e-5f; | ||
2069 | float pathEnd = 1.0f - (float)primShape.PathEnd * 2.0e-5f; | ||
2070 | |||
2071 | float profileBegin = (float)primShape.ProfileBegin * 2.0e-5f; | ||
2072 | float profileEnd = 1.0f - (float)primShape.ProfileEnd * 2.0e-5f; | ||
2062 | 2073 | ||
2063 | Console.WriteLine("********************* PrimitiveBaseShape Parameters *******************\n" | 2074 | Console.WriteLine("********************* PrimitiveBaseShape Parameters *******************\n" |
2064 | + "Name.............: " + name.ToString() + "\n" | 2075 | + "Name.............: " + name.ToString() + "\n" |
2065 | + "HollowShape......: " + primShape.HollowShape.ToString() + "\n" | 2076 | + "HollowShape......: " + primShape.HollowShape.ToString() + "\n" |
2066 | + "PathBegin........: " + primShape.PathBegin.ToString() + "\n" | 2077 | + "PathBegin........: " + primShape.PathBegin.ToString() + " " + pathBegin.ToString() + "\n" |
2067 | + "PathCurve........: " + primShape.PathCurve.ToString() + "\n" | 2078 | + "PathCurve........: " + primShape.PathCurve.ToString() + " " + pathEnd.ToString() + "\n" |
2068 | + "PathEnd..........: " + primShape.PathEnd.ToString() + "\n" | 2079 | + "PathEnd..........: " + primShape.PathEnd.ToString() + "\n" |
2069 | + "PathRadiusOffset.: " + primShape.PathRadiusOffset.ToString() + "\n" | 2080 | + "PathRadiusOffset.: " + primShape.PathRadiusOffset.ToString() + "\n" |
2070 | + "PathRevolutions..: " + primShape.PathRevolutions.ToString() + "\n" | 2081 | + "PathRevolutions..: " + primShape.PathRevolutions.ToString() + "\n" |
@@ -2077,9 +2088,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
2077 | + "PathTaperY.......: " + primShape.PathTaperY.ToString() + "\n" | 2088 | + "PathTaperY.......: " + primShape.PathTaperY.ToString() + "\n" |
2078 | + "PathTwist........: " + primShape.PathTwist.ToString() + "\n" | 2089 | + "PathTwist........: " + primShape.PathTwist.ToString() + "\n" |
2079 | + "PathTwistBegin...: " + primShape.PathTwistBegin.ToString() + "\n" | 2090 | + "PathTwistBegin...: " + primShape.PathTwistBegin.ToString() + "\n" |
2080 | + "ProfileBegin.....: " + primShape.ProfileBegin.ToString() + "\n" | 2091 | + "ProfileBegin.....: " + primShape.ProfileBegin.ToString() + " " + profileBegin.ToString() + "\n" |
2081 | + "ProfileCurve.....: " + primShape.ProfileCurve.ToString() + "\n" | 2092 | + "ProfileCurve.....: " + primShape.ProfileCurve.ToString() + "\n" |
2082 | + "ProfileEnd.......: " + primShape.ProfileEnd.ToString() + "\n" | 2093 | + "ProfileEnd.......: " + primShape.ProfileEnd.ToString() + " " + profileEnd.ToString() + "\n" |
2083 | + "ProfileHollow....: " + primShape.ProfileHollow.ToString() + "\n" | 2094 | + "ProfileHollow....: " + primShape.ProfileHollow.ToString() + "\n" |
2084 | + "ProfileShape.....: " + primShape.ProfileShape.ToString() + "\n" | 2095 | + "ProfileShape.....: " + primShape.ProfileShape.ToString() + "\n" |
2085 | ); | 2096 | ); |