diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index 7397218..1b2f41a 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | |||
@@ -56,6 +56,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
56 | // Setting baseDir to a path will enable the dumping of raw files | 56 | // Setting baseDir to a path will enable the dumping of raw files |
57 | // raw files can be imported by blender so a visual inspection of the results can be done | 57 | // raw files can be imported by blender so a visual inspection of the results can be done |
58 | 58 | ||
59 | const float floatPI = (float)Math.PI; | ||
59 | private static string cacheControlFilename = "cntr"; | 60 | private static string cacheControlFilename = "cntr"; |
60 | private bool m_Enabled = false; | 61 | private bool m_Enabled = false; |
61 | 62 | ||
@@ -931,11 +932,11 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
931 | primMesh.topShearY = pathShearY; | 932 | primMesh.topShearY = pathShearY; |
932 | primMesh.pathCutBegin = pathBegin; | 933 | primMesh.pathCutBegin = pathBegin; |
933 | primMesh.pathCutEnd = pathEnd; | 934 | primMesh.pathCutEnd = pathEnd; |
934 | 935 | ||
935 | if (primShape.PathCurve == (byte)Extrusion.Straight || primShape.PathCurve == (byte) Extrusion.Flexible) | 936 | if (primShape.PathCurve == (byte)Extrusion.Straight || primShape.PathCurve == (byte) Extrusion.Flexible) |
936 | { | 937 | { |
937 | primMesh.twistBegin = (primShape.PathTwistBegin * 18) / 10; | 938 | primMesh.twistBegin = (float)(primShape.PathTwistBegin * (floatPI * 0.01f)); |
938 | primMesh.twistEnd = (primShape.PathTwist * 18) / 10; | 939 | primMesh.twistEnd = (float)(primShape.PathTwist * (floatPI * 0.01f)); |
939 | primMesh.taperX = pathScaleX; | 940 | primMesh.taperX = pathScaleX; |
940 | primMesh.taperY = pathScaleY; | 941 | primMesh.taperY = pathScaleY; |
941 | 942 | ||
@@ -959,8 +960,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
959 | primMesh.radius = 0.01f * primShape.PathRadiusOffset; | 960 | primMesh.radius = 0.01f * primShape.PathRadiusOffset; |
960 | primMesh.revolutions = 1.0f + 0.015f * primShape.PathRevolutions; | 961 | primMesh.revolutions = 1.0f + 0.015f * primShape.PathRevolutions; |
961 | primMesh.skew = 0.01f * primShape.PathSkew; | 962 | primMesh.skew = 0.01f * primShape.PathSkew; |
962 | primMesh.twistBegin = (primShape.PathTwistBegin * 36) / 10; | 963 | primMesh.twistBegin = (float)(primShape.PathTwistBegin * (floatPI * 0.02f)); |
963 | primMesh.twistEnd = (primShape.PathTwist * 36) / 10; | 964 | primMesh.twistEnd = (float)(primShape.PathTwistBegin * (floatPI * 0.02f)); |
964 | primMesh.taperX = primShape.PathTaperX * 0.01f; | 965 | primMesh.taperX = primShape.PathTaperX * 0.01f; |
965 | primMesh.taperY = primShape.PathTaperY * 0.01f; | 966 | primMesh.taperY = primShape.PathTaperY * 0.01f; |
966 | 967 | ||