From 4c5a9091c29b442b05147e0c80d2898ad07b891b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 3 Apr 2019 20:34:22 +0200 Subject: [PATCH] made allcells work correctly in S^3 --- reg3.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reg3.cpp b/reg3.cpp index 44bdb179..70c91760 100644 --- a/reg3.cpp +++ b/reg3.cpp @@ -516,6 +516,13 @@ namespace reg3 { unordered_map> reg_gmatrix; unordered_map > > altmap; + vector spherecells; + + vector& allcells() override { + if(sphere) return spherecells; + return hrmap::allcells(); + } + hrmap_reg3() { generate(); origin = tailored_alloc (S7); @@ -526,6 +533,7 @@ namespace reg3 { h.distance = 0; h.fieldval = 0; h.c7 = newCell(S7, origin); + if(sphere) spherecells.push_back(h.c7); worst_error1 = 0, worst_error2 = 0; dynamicval cr(currentmap, this); @@ -680,6 +688,7 @@ namespace reg3 { #endif heptagon *created = tailored_alloc (S7); created->c7 = newCell(S7, created); + if(sphere) spherecells.push_back(created->c7); created->alt = NULL; created->cdata = NULL; #if CAP_FIELD