adjusted grigorchuk to shiftmatrix

This commit is contained in:
Zeno Rogue 2020-07-29 23:03:20 +02:00
parent c1ac290491
commit e99251e70c
1 changed files with 7 additions and 9 deletions

View File

@ -393,17 +393,15 @@ struct hrmap_grigorchuk : hrmap_standard {
return h;
}
void draw() override {
void draw_at(cell *at, const shiftmatrix& where) override {
dq::visited_by_matrix.clear();
dq::enqueue_by_matrix(centerover->master, cview() * master_relative(centerover, true));
dq::clear_all();
dq::enqueue_by_matrix(at->master, where * master_relative(centerover, true));
while(!dq::drawqueue.empty()) {
auto& p = dq::drawqueue.front();
heptagon *h = get<0>(p);
transmatrix V = get<1>(p);
dynamicval<ld> b(band_shift, get<2>(p));
bandfixer bf(V);
shiftmatrix V = get<1>(p);
dq::drawqueue.pop();
cell *c = h->c7;
@ -419,19 +417,19 @@ struct hrmap_grigorchuk : hrmap_standard {
drawcell(c, V * master_relative(c, false));
for(int i=0; i<3; i++) if(c->move(i))
dq::enqueue_by_matrix(h->cmove(i), V * adj(h, i));
dq::enqueue_by_matrix(h->cmove(i), optimized_shift(V * adj(h, i)));
}
}
transmatrix relative_matrix(heptagon *h2, heptagon *h1, const hyperpoint& hint) override {
if(gmatrix0.count(h2->c7) && gmatrix0.count(h1->c7))
return inverse(gmatrix0[h1->c7]) * gmatrix0[h2->c7];
return inverse_shift(gmatrix0[h1->c7], gmatrix0[h2->c7]);
return Id;
}
transmatrix relative_matrix(cell *c2, cell *c1, const struct hyperpoint& hint) override {
if(gmatrix0.count(c2) && gmatrix0.count(c1))
return inverse(gmatrix0[c1]) * gmatrix0[c2];
return inverse_shift(gmatrix0[c1], gmatrix0[c2]);
return Id;
}
};