Add end faces when radius setting is non-zero

0.6.0-stable
Dahlia Trimble 2008-10-24 23:37:09 +00:00
parent 64f9f03e9a
commit 3447bed8be
1 changed files with 8 additions and 5 deletions

View File

@ -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");