From dfea55428969e281dc3cf8f4e81894a2b17bdbce Mon Sep 17 00:00:00 2001 From: David Allemang Date: Sun, 28 Jun 2020 15:07:10 -0400 Subject: [PATCH] remove broken flipping mechanics --- vis/include/geometry.hpp | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/vis/include/geometry.hpp b/vis/include/geometry.hpp index b8f2546..a8a5b2a 100644 --- a/vis/include/geometry.hpp +++ b/vis/include/geometry.hpp @@ -28,15 +28,10 @@ struct Primitive { ~Primitive() = default; - inline void flip() { - if (N > 1) std::swap(inds[0], inds[1]); - } - void apply(const tc::Cosets &table, int gen) { for (auto &ind : inds) { ind = table.get(ind, gen); } - flip(); } }; @@ -74,28 +69,6 @@ std::vector recontext_gens( return s_sg_gens; } -/** - * Determine whether the orientation of the group sg_gens is reversed from the group g_gens within group context - */ -int get_parity( - const tc::Group &context, - const std::vector &g_gens, - const std::vector &sg_gens -) { - if (g_gens.size() != sg_gens.size() + 1) return 0; - - const auto proper_sg_gens = recontext_gens(context, g_gens, sg_gens); - - int i = 0; - for (; i < sg_gens.size(); ++i) { - if (proper_sg_gens[i] != i) { - break; - } - } - - return i & 1; -} - /** * Solve the cosets generated by sg_gens within the subgroup generated by g_gens of the group context */ @@ -119,16 +92,6 @@ std::vector> apply(std::vector> prims, const tc::Coset return prims; } -/** - * Reverse the orientation of all primitives in this mesh. - */ -template -void flip(std::vector> prims) { - for (auto &prim : prims) { - prim.flip(); - } -} - /** * Convert the indexes of this mesh to those of a different context, using g_gens to build the parent context and sg_gens to build this context. */ @@ -155,9 +118,6 @@ std::vector> recontext( } } - if (get_parity(context, g_gens, sg_gens) == 1) - flip(res); - return res; }