diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/PrimMesher.cs | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index e96985d..53cae56 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs | |||
@@ -1166,6 +1166,10 @@ namespace PrimMesher | |||
1166 | } | 1166 | } |
1167 | } | 1167 | } |
1168 | 1168 | ||
1169 | bool hasProfileCut = false; | ||
1170 | if (profileStart > 0.0f || profileEnd < 1.0f) | ||
1171 | hasProfileCut = true; | ||
1172 | |||
1169 | bool needEndFaces = false; | 1173 | bool needEndFaces = false; |
1170 | if (this.pathCutBegin != 0.0 || this.pathCutEnd != 1.0) | 1174 | if (this.pathCutBegin != 0.0 || this.pathCutEnd != 1.0) |
1171 | needEndFaces = true; | 1175 | needEndFaces = true; |
@@ -1253,7 +1257,14 @@ namespace PrimMesher | |||
1253 | Face newFace = new Face(); | 1257 | Face newFace = new Face(); |
1254 | if (step > firstStep) | 1258 | if (step > firstStep) |
1255 | { | 1259 | { |
1256 | for (int i = coordsLen; i < this.coords.Count - 1; i++) | 1260 | int startVert = coordsLen + 1; |
1261 | int endVert = this.coords.Count - 1; | ||
1262 | |||
1263 | if (sides < 5 || hasProfileCut || hollow > 0.0f) | ||
1264 | startVert--; | ||
1265 | |||
1266 | for (int i = startVert; i < endVert; i++) | ||
1267 | //for (int i = coordsLen; i < this.coords.Count - 1; i++) | ||
1257 | { | 1268 | { |
1258 | newFace.v1 = i; | 1269 | newFace.v1 = i; |
1259 | newFace.v2 = i - numVerts; | 1270 | newFace.v2 = i - numVerts; |
@@ -1265,15 +1276,18 @@ namespace PrimMesher | |||
1265 | this.faces.Add(newFace); | 1276 | this.faces.Add(newFace); |
1266 | } | 1277 | } |
1267 | 1278 | ||
1268 | newFace.v1 = coordsLen - 1; | 1279 | if (hasProfileCut) |
1269 | newFace.v2 = coordsLen - numVerts; | 1280 | { |
1270 | newFace.v3 = coordsLen; | 1281 | newFace.v1 = coordsLen - 1; |
1271 | this.faces.Add(newFace); | 1282 | newFace.v2 = coordsLen - numVerts; |
1283 | newFace.v3 = coordsLen; | ||
1284 | this.faces.Add(newFace); | ||
1272 | 1285 | ||
1273 | newFace.v1 = coordsLen + numVerts - 1; | 1286 | newFace.v1 = coordsLen + numVerts - 1; |
1274 | newFace.v2 = coordsLen - 1; | 1287 | newFace.v2 = coordsLen - 1; |
1275 | newFace.v3 = coordsLen; | 1288 | newFace.v3 = coordsLen; |
1276 | this.faces.Add(newFace); | 1289 | this.faces.Add(newFace); |
1290 | } | ||
1277 | } | 1291 | } |
1278 | 1292 | ||
1279 | // calculate terms for next iteration | 1293 | // calculate terms for next iteration |