ls:: in voronoi, eliminate bugs when new root goes through known area
This commit is contained in:
parent
283fe020fc
commit
2668841e5a
|
@ -226,7 +226,8 @@ void new_voronoi_root(heptagon *h, int dist, int dir, eLand next, eLand last) {
|
||||||
alt->alt = alt;
|
alt->alt = alt;
|
||||||
alt->cdata = (cdata*) h;
|
alt->cdata = (cdata*) h;
|
||||||
alt->distance = dist;
|
alt->distance = dist;
|
||||||
h->alt = alt;
|
vector<pair<heptagon*, heptagon*>> altpairs;
|
||||||
|
altpairs.emplace_back(h, alt);
|
||||||
altmap::relspin(alt) = dir;
|
altmap::relspin(alt) = dir;
|
||||||
|
|
||||||
horodisk_land[alt] = next;
|
horodisk_land[alt] = next;
|
||||||
|
@ -236,6 +237,8 @@ void new_voronoi_root(heptagon *h, int dist, int dir, eLand next, eLand last) {
|
||||||
auto alt1 = createStep(alt, 0);
|
auto alt1 = createStep(alt, 0);
|
||||||
alt1->alt = alt->alt;
|
alt1->alt = alt->alt;
|
||||||
auto h1 = createStep(h, dir);
|
auto h1 = createStep(h, dir);
|
||||||
|
if(h1->alt) return;
|
||||||
|
altpairs.emplace_back(h1, alt1);
|
||||||
h1->alt = alt1;
|
h1->alt = alt1;
|
||||||
|
|
||||||
auto dir_alt = alt->c.spin(0);
|
auto dir_alt = alt->c.spin(0);
|
||||||
|
@ -245,8 +248,11 @@ void new_voronoi_root(heptagon *h, int dist, int dir, eLand next, eLand last) {
|
||||||
|
|
||||||
h = h1; alt = alt1;
|
h = h1; alt = alt1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(auto p: altpairs) p.first->alt = p.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct cand_info {
|
struct cand_info {
|
||||||
int best, bqty;
|
int best, bqty;
|
||||||
heptagon *candidate;
|
heptagon *candidate;
|
||||||
|
|
Loading…
Reference in New Issue