From 3447bed8be494c09d6df02efde328183a4d1a988 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Fri, 24 Oct 2008 23:37:09 +0000 Subject: Add end faces when radius setting is non-zero --- OpenSim/Region/Physics/Meshing/PrimMesher.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index bec1495..3f7d40c 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs @@ -976,7 +976,7 @@ namespace PrimMesher this.faceNormal.Y = -this.faceNormal.Y; this.faceNormal.Z = -this.faceNormal.Z; - //int numUs = this.us.Count; + int numUs = this.us.Count; //for (int i = 0; i < numUs; i++) // this.us[i] @@ -1598,13 +1598,15 @@ namespace PrimMesher } bool needEndFaces = false; - if (this.pathCutBegin != 0.0 || this.pathCutEnd != 1.0) + if (this.pathCutBegin != 0.0f || this.pathCutEnd != 1.0f) needEndFaces = true; - else if (this.taperX != 0.0 || this.taperY != 0.0) + else if (this.taperX != 0.0f || this.taperY != 0.0f) needEndFaces = true; - else if (this.skew != 0.0) + else if (this.skew != 0.0f) needEndFaces = true; - else if (twistTotal != 0.0) + else if (twistTotal != 0.0f) + needEndFaces = true; + else if (this.radius != 0.0f) needEndFaces = true; Profile profile = new Profile(this.sides, this.profileStart, this.profileEnd, hollow, this.hollowSides, needEndFaces, calcVertexNormals); @@ -1928,6 +1930,7 @@ namespace PrimMesher public Coord SurfaceNormal(int faceIndex) { + int numFaces = faces.Count; if (faceIndex < 0 || faceIndex >= faces.Count) throw new Exception("faceIndex out of range"); -- cgit v1.1