LineLayer: drop line segments short than 1/8
This commit is contained in:
parent
457e3006a6
commit
a42bd9684f
@ -170,6 +170,7 @@ public final class LineLayer extends RenderElement {
|
|||||||
|
|
||||||
// Unit vector to next node
|
// Unit vector to next node
|
||||||
a = (float) Math.sqrt(vx * vx + vy * vy);
|
a = (float) Math.sqrt(vx * vx + vy * vy);
|
||||||
|
|
||||||
vx /= a;
|
vx /= a;
|
||||||
vy /= a;
|
vy /= a;
|
||||||
|
|
||||||
@ -340,6 +341,11 @@ public final class LineLayer extends RenderElement {
|
|||||||
wx = nextX - x;
|
wx = nextX - x;
|
||||||
wy = nextY - y;
|
wy = nextY - y;
|
||||||
a = (float) Math.sqrt(wx * wx + wy * wy);
|
a = (float) Math.sqrt(wx * wx + wy * wy);
|
||||||
|
// skip too short segmets
|
||||||
|
if (a < 1) {
|
||||||
|
numVertices -= 2;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
wx /= a;
|
wx /= a;
|
||||||
wy /= a;
|
wy /= a;
|
||||||
|
|
||||||
@ -548,7 +554,6 @@ public final class LineLayer extends RenderElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
si.used = opos;
|
si.used = opos;
|
||||||
//curItem = si;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user