diff options
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/PrimMesher.cs')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/PrimMesher.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index 86bdabc..08b2d10 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | 30 | using System.IO; |
31 | using OpenSim.Region.Physics.Manager; | 31 | using OpenSim.Region.Physics.Manager; |
32 | using OpenMetaverse; | ||
32 | 33 | ||
33 | namespace OpenSim.Region.Physics.Meshing | 34 | namespace OpenSim.Region.Physics.Meshing |
34 | { | 35 | { |
@@ -783,7 +784,7 @@ angles24 = [ | |||
783 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides); | 784 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides); |
784 | 785 | ||
785 | if (initialProfileRot != 0.0f) | 786 | if (initialProfileRot != 0.0f) |
786 | profile.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), initialProfileRot)); | 787 | profile.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), initialProfileRot)); |
787 | 788 | ||
788 | bool done = false; | 789 | bool done = false; |
789 | while (!done) | 790 | while (!done) |
@@ -807,7 +808,7 @@ angles24 = [ | |||
807 | 808 | ||
808 | float twist = twistBegin + twistTotal * percentOfPath; | 809 | float twist = twistBegin + twistTotal * percentOfPath; |
809 | if (twist != 0.0f) | 810 | if (twist != 0.0f) |
810 | newLayer.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist)); | 811 | newLayer.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), twist)); |
811 | 812 | ||
812 | newLayer.AddPos(xOffset, yOffset, zOffset); | 813 | newLayer.AddPos(xOffset, yOffset, zOffset); |
813 | 814 | ||
@@ -948,7 +949,7 @@ angles24 = [ | |||
948 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides); | 949 | Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides); |
949 | 950 | ||
950 | if (initialProfileRot != 0.0f) | 951 | if (initialProfileRot != 0.0f) |
951 | profile.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), initialProfileRot)); | 952 | profile.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), initialProfileRot)); |
952 | 953 | ||
953 | bool done = false; | 954 | bool done = false; |
954 | while (!done) // loop through the length of the path and add the layers | 955 | while (!done) // loop through the length of the path and add the layers |
@@ -991,12 +992,12 @@ angles24 = [ | |||
991 | 992 | ||
992 | // next apply twist rotation to the profile layer | 993 | // next apply twist rotation to the profile layer |
993 | if (twistTotal != 0.0f || twistBegin != 0.0f) | 994 | if (twistTotal != 0.0f || twistBegin != 0.0f) |
994 | newLayer.AddRot(new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist)); | 995 | newLayer.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(0.0f, 0.0f, 1.0f), twist)); |
995 | 996 | ||
996 | // now orient the rotation of the profile layer relative to it's position on the path | 997 | // now orient the rotation of the profile layer relative to it's position on the path |
997 | // adding taperY to the angle used to generate the quat appears to approximate the viewer | 998 | // adding taperY to the angle used to generate the quat appears to approximate the viewer |
998 | //newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY * 0.9f)); | 999 | //newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY * 0.9f)); |
999 | newLayer.AddRot(new Quaternion(new Vertex(1.0f, 0.0f, 0.0f), angle + this.topShearY)); | 1000 | newLayer.AddRot(Quaternion.CreateFromAxisAngle(new Vector3(1.0f, 0.0f, 0.0f), angle + this.topShearY)); |
1000 | newLayer.AddPos(xOffset, yOffset, zOffset); | 1001 | newLayer.AddPos(xOffset, yOffset, zOffset); |
1001 | 1002 | ||
1002 | if (angle == startAngle) | 1003 | if (angle == startAngle) |