From fb2cabd6b35bdbc966598de361044e2ff0164e5c Mon Sep 17 00:00:00 2001 From: dahlia Date: Fri, 25 Sep 2009 13:00:49 -0700 Subject: corrections to viewerMode AddPos() --- OpenSim/Region/Physics/Meshing/PrimMesher.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'OpenSim/Region/Physics/Meshing/PrimMesher.cs') diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index 0d19c01..abfd400 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs @@ -345,6 +345,21 @@ namespace PrimMesher this.v3.Z *= z; } + public void AddPos(float x, float y, float z) + { + this.v1.X += x; + this.v2.X += x; + this.v3.X += x; + + this.v1.Y += y; + this.v2.Y += y; + this.v3.Y += y; + + this.v1.Z += z; + this.v2.Z += z; + this.v3.Z += z; + } + public void AddRot(Quat q) { this.v1 *= q; @@ -2141,6 +2156,18 @@ namespace PrimMesher vert.Z += z; this.coords[i] = vert; } + + if (this.viewerFaces != null) + { + int numViewerFaces = this.viewerFaces.Count; + + for (i = 0; i < numViewerFaces; i++) + { + ViewerFace v = this.viewerFaces[i]; + v.AddPos(x, y, z); + this.viewerFaces[i] = v; + } + } } /// -- cgit v1.1