From 4c01859192d8eec835ec6be8206c109ddcc52c5b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 3 Sep 2018 16:32:34 +0200 Subject: [PATCH] struct archimedean_tiling exported in hyper.h --- archimedean.cpp | 62 --------------------------------------------- hyper.h | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 62 deletions(-) diff --git a/archimedean.cpp b/archimedean.cpp index 42f8e4f1..f4b245c2 100644 --- a/archimedean.cpp +++ b/archimedean.cpp @@ -10,68 +10,6 @@ static const int sfCHESS = 4; static const int sfTHREE = 8; static const int sfSEMILINE = 16; -struct archimedean_tiling { - - int coloring; - - string symbol; - - vector faces; - vector adj; - vector invert; - vector nflags; - - bool have_ph, have_line, have_symmetry; - int real_faces; - int real_face_type; - - int repetition; - int N; - - ld euclidean_angle_sum; - - vector flags; - - vector>> adjacent; - vector>> triangles; - - void make_match(int a, int i, int b, int j); - void prepare(); - void compute_geometry(); - - void parse(); - void parse(string s) { symbol = s; parse(); } - - ld edgelength; - - vector inradius, circumradius, alphas; - - int matches[30][30]; - int periods[30]; - int tilegroup[30], groupoffset[30], tilegroups; - - int errors; - string errormsg; - - pair& get_adj(heptagon *h, int cid); - pair& get_adj(heptspin hs) { return get_adj(hs.at, hs.spin); } - pair& get_triangle(heptagon *h, int cid); - pair& get_triangle(heptspin hs) { return get_triangle(hs.at, hs.spin); } - pair& get_triangle(const pair& p, int delta = 0); - pair& get_adj(const pair& p, int delta = 0); - - int support_threecolor(); - int support_threecolor_bitruncated(); - int support_football(); - bool support_chessboard(); - void regroup(); - string world_size(); - - eGeometryClass get_class(); - - ld scale(); - }; - archimedean_tiling current; // id of vertex in the archimedean tiling diff --git a/hyper.h b/hyper.h index 94df37ee..0705b5e9 100644 --- a/hyper.h +++ b/hyper.h @@ -3922,6 +3922,73 @@ namespace binary { } namespace arcm { + + struct archimedean_tiling { + + int coloring; + + string symbol; + + vector faces; + vector adj; + vector invert; + vector nflags; + + bool have_ph, have_line, have_symmetry; + int real_faces; + int real_face_type; + + int repetition; + int N; + + ld euclidean_angle_sum; + + vector flags; + + vector>> adjacent; + vector>> triangles; + + void make_match(int a, int i, int b, int j); + void prepare(); + void compute_geometry(); + + void parse(); + void parse(string s) { symbol = s; parse(); } + + ld edgelength; + + vector inradius, circumradius, alphas; + + int matches[30][30]; + int periods[30]; + int tilegroup[30], groupoffset[30], tilegroups; + + int errors; + string errormsg; + + pair& get_adj(heptagon *h, int cid); + pair& get_adj(heptspin hs) { return get_adj(hs.at, hs.spin); } + pair& get_triangle(heptagon *h, int cid); + pair& get_triangle(heptspin hs) { return get_triangle(hs.at, hs.spin); } + pair& get_triangle(const pair& p, int delta = 0); + pair& get_adj(const pair& p, int delta = 0); + + int support_threecolor(); + int support_threecolor_bitruncated(); + int support_football(); + bool support_chessboard(); + void regroup(); + string world_size(); + + eGeometryClass get_class(); + + ld scale(); + }; + + extern archimedean_tiling current; + + extern map> archimedean_gmatrix; + void initialize(heptagon *root); transmatrix relative_matrix(heptagon *h1, heptagon *h2); short& id_of(heptagon *);