From ec5e789045e73ce58e63c50f2ae85a5803b24162 Mon Sep 17 00:00:00 2001 From: Caleb Hulbert Date: Fri, 15 Dec 2023 15:50:11 -0500 Subject: [PATCH] fix: when overlap toggled off, mesh faces at the end of the volume are not rendered --- .../java/org/janelia/saalfeldlab/paintera/meshes/Mesh.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/janelia/saalfeldlab/paintera/meshes/Mesh.java b/src/main/java/org/janelia/saalfeldlab/paintera/meshes/Mesh.java index a937135b4..d05b970dd 100644 --- a/src/main/java/org/janelia/saalfeldlab/paintera/meshes/Mesh.java +++ b/src/main/java/org/janelia/saalfeldlab/paintera/meshes/Mesh.java @@ -103,11 +103,11 @@ public Mesh(final float[] flatTrianglesAndVertices, final Interval interval, fin final ArrayList trianglesPerVertex = new ArrayList<>(); final TIntArrayList triangleVertexIndices = new TIntArrayList(); - final double minY = interval.min(1) - 1; final double minX = interval.min(0) - 1; + final double minY = interval.min(1) - 1; final double minZ = interval.min(2) - 1; - final int overlapOffset = overlap ? 1 : 0; + final double overlapOffset = overlap ? 1 : .5; final double maxX = interval.max(0) + overlapOffset; final double maxY = interval.max(1) + overlapOffset; final double maxZ = interval.max(2) + overlapOffset;