ENH: Simplify solving logic

This is a combination of multiple WIP commits:

- Semantic group names - G, H
- Simplify fan<>()
- Template int deduction
- Remove _recontext_gens
- Move g_gens logic into caller
- Move subgroup logic into caller
- Move recontext logic into coller
- Move _generators, _recontext_gens to anonymous namespace
- Simplify hull, tile
This commit is contained in:
David Allemang
2023-02-07 16:15:19 -05:00
parent 47a78027bd
commit 92a55f8c74
7 changed files with 91 additions and 147 deletions

View File

@@ -22,9 +22,6 @@ namespace vis {
tc::Group group;
vec5 root;
vec3 color;
std::vector<std::vector<size_t>> exclude {{0, 1, 2}};
std::vector<std::vector<size_t>> include = combinations(_generators(group), 3);
};
struct VBOs {
@@ -62,9 +59,13 @@ namespace vis {
vbos.verts.put(lower.colwise().begin(), lower.colwise().end());
// todo generate all, then mask using glMultiDraw.
const size_t N = 4;
const Eigen::Index N = 4;
auto inds = merge<N>(hull<N>(group.group, group.include, group.exclude));
auto tiles = hull<N>(group.group);
tiles.erase(tiles.begin()); // remove {0, 1, 2} cells
auto inds = merge<N>(tiles);
vbos.ibo.put(inds.colwise().begin(), inds.colwise().end());
}