Commit 66777c19 authored by Andrey Filippov's avatar Andrey Filippov

fixed gaps on maps

parent 1e2d8ada
...@@ -7448,7 +7448,8 @@ public class TexturedModel { ...@@ -7448,7 +7448,8 @@ public class TexturedModel {
faded_textures[nslice][0], // final double [] data, faded_textures[nslice][0], // final double [] data,
null, // final boolean [] prohibit, null, // final boolean [] prohibit,
width, // int width, width, // int width,
16, // final int grow, // CAREFUL ! Remaining NaN is grown by unsharp mask filter ************* !
100, // 2*width, // 16, // final int grow,
0.7, // double diagonal_weight, // relative to ortho 0.7, // double diagonal_weight, // relative to ortho
100, // int num_passes, 100, // int num_passes,
0.03, // final double max_rchange, // = 0.01 - does not need to be accurate 0.03, // final double max_rchange, // = 0.01 - does not need to be accurate
......
...@@ -196,6 +196,7 @@ public class Render3D { ...@@ -196,6 +196,7 @@ public class Render3D {
if ((tri_meshes == null) || tri_meshes.isEmpty() || (tri_meshes.get(0).getTexturePixels() == null)) { if ((tri_meshes == null) || tri_meshes.isEmpty() || (tri_meshes.get(0).getTexturePixels() == null)) {
return null; return null;
} }
final int dbg_ipix=1673752;
// get total number of triangles // get total number of triangles
int num_tri=0; int num_tri=0;
for (TriMesh tri: tri_meshes) { for (TriMesh tri: tri_meshes) {
...@@ -285,8 +286,10 @@ public class Render3D { ...@@ -285,8 +286,10 @@ public class Render3D {
if (!cross2ccw(d02,d0p)) continue; if (!cross2ccw(d02,d0p)) continue;
double [] d1p = new double[] {ipx-tri_out2[1][0],ipy-tri_out2[1][1]}; double [] d1p = new double[] {ipx-tri_out2[1][0],ipy-tri_out2[1][1]};
if (!cross2ccw(d1p,d12)) continue; if (!cross2ccw(d1p,d12)) continue;
//
int ipix = ipx +(out_height - 1 -ipy) * out_width; // Y goes down int ipix = ipx +(out_height - 1 -ipy) * out_width; // Y goes down
if (ipix== dbg_ipix) {
System.out.println("ipix="+ipix);
}
// See if the rendered pixel is closer than the closest of the corners // See if the rendered pixel is closer than the closest of the corners
if ((rend[ipix] != null ) && (rend[ipix][z_index] < min_max_xyz[2][0])) { if ((rend[ipix] != null ) && (rend[ipix][z_index] < min_max_xyz[2][0])) {
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment