Skip to content

Commit 7e3b312

Browse files
authored
Update Mesh.cs
Fix Bounds calculation.
1 parent 6d38c63 commit 7e3b312

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Obj2Tiles.Library/Geometry/Mesh.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ public Box3 Bounds
254254
minY = minY < v.Y ? minY : v.Y;
255255
minZ = minZ < v.Z ? minZ : v.Z;
256256

257-
maxX = v.X > maxX ? maxX : v.X;
258-
maxY = v.Y > maxY ? maxY : v.Y;
259-
maxZ = v.Z > maxZ ? maxZ : v.Z;
257+
maxX = v.X < maxX ? maxX : v.X;
258+
maxY = v.Y < maxY ? maxY : v.Y;
259+
maxZ = v.Z < maxZ ? maxZ : v.Z;
260260
}
261261

262262
return new Box3(minX, minY, minZ, maxX, maxY, maxZ);
@@ -352,4 +352,4 @@ private void RemoveUnusedVertices()
352352
#endregion
353353

354354

355-
}
355+
}

0 commit comments

Comments
 (0)