1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-21 00:47:40 +00:00

the main (heptagon) cellshape now also uses subcellshape; removed dirdist and get_vertices and introduced get_cellshape instead

This commit is contained in:
Zeno Rogue
2021-07-12 11:07:22 +02:00
parent 2d962c324d
commit 6e6d0a7839
14 changed files with 182 additions and 206 deletions

View File

@@ -472,8 +472,12 @@ EX namespace bt {
return gm * where;
}
vector<hyperpoint> get_vertices(cell* c) override {
vector<hyperpoint> res;
subcellshape& get_cellshape(cell *c) override {
if(cgi.heptshape)
return *cgi.heptshape;
cgi.heptshape = (std::unique_ptr<subcellshape>) (new subcellshape);
vector<hyperpoint>& res = cgi.heptshape->vertices_only;
ld yy = log(2) / 2;
auto add = [&] (hyperpoint h) {
res.push_back(bt::parabolic3(h[0], h[1]) * xpush0(yy*h[2]));
@@ -512,7 +516,8 @@ EX namespace bt {
}
default: ;
}
return res;
cgi.heptshape->vertices_only_local = res;
return *cgi.heptshape;
}
ld spin_angle(cell *c, int d) override {