diff --git a/vis/include/combo_iterator.hpp b/vis/include/combo_iterator.hpp index 49bdb5c..1669b2b 100644 --- a/vis/include/combo_iterator.hpp +++ b/vis/include/combo_iterator.hpp @@ -61,6 +61,19 @@ public: (*this)++; return res; } + + auto operator--(int) { + std::next_permutation(bits.begin(), bits.end()); + set_curr(); + --at; + return *this; + } + + auto operator--() &{ + auto res = *this; + (*this)--; + return res; + } }; template diff --git a/vis/src/main.cpp b/vis/src/main.cpp index c9f275e..e9f531c 100644 --- a/vis/src/main.cpp +++ b/vis/src/main.cpp @@ -156,19 +156,21 @@ void run(GLFWwindow *window) { .stage(sh.slice) .stage(sh.solid); - auto group = tc::schlafli({3, 4, 3, 2}); + auto group = tc::schlafli({5, 3, 3, 2}); const auto combos = Combos({0, 1, 2, 3, 4}, 3); + const auto coord = (vec5) {1.0, 0.1, 0.1, 0.1, 0.025}; + auto slices = { Slice<4>::build( group, - (vec5) {1.0, 0.1, 0.1, 0.1, 0.025} * 0.8, - {0.9f, 0.9f, 0.9f, 1.0f}, + coord * 0.3, + {0.9f, 0.3f, 0.3f, 1.0f}, combos.begin(), combos.end()), Slice<4>::build( group, - (vec5) {1.0, 0.1, 0.1, 0.1, 0.025}, + coord, {0.3f, 0.3f, 0.3f, 1.0f}, combos.begin()++, combos.end()), };