From 71660003de81ad72e991941743c8d685cbca9208 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Fri, 24 Oct 2008 20:04:34 +0000 Subject: un-double-flipped some double-flipped normals in circular path prim end caps --- OpenSim/Region/Physics/Meshing/PrimMesher.cs | 44 ++-------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index df1d932..2a019ca 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs @@ -1624,7 +1624,7 @@ namespace PrimMesher while (!done) // loop through the length of the path and add the layers { bool isEndLayer = false; - if (angle == startAngle || angle >= endAngle) + if (angle <= startAngle + .01f || angle >= endAngle - .01f) isEndLayer = true; //Profile newLayer = profile.Clone(isEndLayer && needEndFaces); @@ -1674,10 +1674,7 @@ namespace PrimMesher newLayer.AddRot(new Quat(new Coord(1.0f, 0.0f, 0.0f), angle + this.topShearY)); newLayer.AddPos(xOffset, yOffset, zOffset); - if (angle == startAngle) - newLayer.FlipNormals(); - - if (angle == startAngle) + if (isEndLayer && angle <= startAngle + .01f) { newLayer.FlipNormals(); @@ -1749,30 +1746,6 @@ namespace PrimMesher newFace.v3 = i + 1; this.faces.Add(newFace); - //if (this.viewerMode) - //{ - // // add the side faces to the list of viewerFaces here - // ViewerFace newViewerFace = new ViewerFace(); - // newViewerFace.v1 = this.coords[i]; - // newViewerFace.v2 = this.coords[i - numVerts]; - // newViewerFace.v3 = this.coords[i - numVerts + 1]; - - // newViewerFace.n1 = this.normals[i]; - // newViewerFace.n2 = this.normals[i - numVerts]; - // newViewerFace.n3 = this.normals[i - numVerts + 1]; - - // this.viewerFaces.Add(newViewerFace); - - // newViewerFace.v2 = this.coords[i - numVerts + 1]; - // newViewerFace.v3 = this.coords[i + 1]; - - // newViewerFace.n2 = this.normals[i - numVerts + 1]; - // newViewerFace.n3 = this.normals[i + 1]; - - // this.viewerFaces.Add(newViewerFace); - - //} - if (this.viewerMode) { // add the side faces to the list of viewerFaces here @@ -1842,19 +1815,6 @@ namespace PrimMesher } } - //if (this.hasProfileCut) - //{ - // newFace.v1 = coordsLen - 1; - // newFace.v2 = coordsLen - numVerts; - // newFace.v3 = coordsLen; - // this.faces.Add(newFace); - - // newFace.v1 = coordsLen + numVerts - 1; - // newFace.v2 = coordsLen - 1; - // newFace.v3 = coordsLen; - // this.faces.Add(newFace); - //} - if (this.hasProfileCut) { // add the end cut face to the list of viewerFaces here // the first cut face was filled in the above loop -- cgit v1.1