Skip to content

Commit

Permalink
Update Mesh.cs
Browse files Browse the repository at this point in the history
Fix Bounds calculation.
  • Loading branch information
kgdev authored Sep 11, 2022
1 parent 6d38c63 commit 7e3b312
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Obj2Tiles.Library/Geometry/Mesh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ public Box3 Bounds
minY = minY < v.Y ? minY : v.Y;
minZ = minZ < v.Z ? minZ : v.Z;

maxX = v.X > maxX ? maxX : v.X;
maxY = v.Y > maxY ? maxY : v.Y;
maxZ = v.Z > maxZ ? maxZ : v.Z;
maxX = v.X < maxX ? maxX : v.X;
maxY = v.Y < maxY ? maxY : v.Y;
maxZ = v.Z < maxZ ? maxZ : v.Z;
}

return new Box3(minX, minY, minZ, maxX, maxY, maxZ);
Expand Down Expand Up @@ -352,4 +352,4 @@ private void RemoveUnusedVertices()
#endregion


}
}

0 comments on commit 7e3b312

Please sign in to comment.