From c97ab107008fbe77892a0bb96d78ef371c69b6ca Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 28 Jul 2019 11:17:25 +0200 Subject: [PATCH] pushed unimplemented Product --- cell.cpp | 3 +++ classes.cpp | 3 ++- classes.h | 4 ++-- compileunits.h | 1 + geom-exp.cpp | 4 ++++ graph.cpp | 2 ++ hyper.h | 2 +- hypgraph.cpp | 2 ++ rug.cpp | 2 +- sysconfig.h | 3 +++ 10 files changed, 21 insertions(+), 5 deletions(-) diff --git a/cell.cpp b/cell.cpp index b5e4338f..9e3da890 100644 --- a/cell.cpp +++ b/cell.cpp @@ -93,6 +93,8 @@ cell *createMov(cell *c, int d) { } if(c->move(d)) return c->move(d); + PROD( else if(geometry == gProduct) + product::find_cell_connection(c, d); ) #if CAP_BT else if(penrose) kite::find_cell_connection(c, d); @@ -221,6 +223,7 @@ void initcells() { #if CAP_CRYSTAL else if(geometry == gCrystal) currentmap = crystal::new_map(); #endif + PROD( else if(geometry == gProduct) currentmap = product::new_map(); ) #if CAP_ARCM else if(archimedean) currentmap = arcm::new_map(); #endif diff --git a/classes.cpp b/classes.cpp index 797b0545..2e568d84 100644 --- a/classes.cpp +++ b/classes.cpp @@ -563,7 +563,8 @@ vector ginf = { {"sol", "none", "Sol", "sol", 8, 3, qBINARY, gcSol, 0x41600, {{7, 5}}, eVariation::pure}, {"kd2", "none", "kite-and-dart", "kd2", 4, 3, qPENROSE, gcEuclid, 0x48000, {{7, 7}}, eVariation::pure}, {"kd3", "none", "kite-and-dart on horospheres", "kd3", 12, 3, qsBP, gcHyperbolic, 0x48200, {{7, 3}}, eVariation::pure}, - }; +//{"product","none", "product space", "product", 7, 3, 0, gcProduct, 0x48400, {{7, 3}}, eVariation::pure}, + }; // bits: 9, 10, 15, 16, (reserved for later) 17, 18 diff --git a/classes.h b/classes.h index e1727e8e..17ae50eb 100644 --- a/classes.h +++ b/classes.h @@ -201,10 +201,10 @@ enum eGeometry { gHoroTris, gHoroRec, gHoroHex, gField435, gField534, gBinary4, gSol, - gKiteDart2, gKiteDart3, + gKiteDart2, gKiteDart3, PROD2(gProduct,) gGUARD}; -enum eGeometryClass { gcHyperbolic, gcEuclid, gcSphere, gcSol }; +enum eGeometryClass { gcHyperbolic, gcEuclid, gcSphere, gcSol, PROD(gcProduct) }; enum class eVariation { bitruncated, pure, goldberg, irregular, dual }; diff --git a/compileunits.h b/compileunits.h index 7ec83b57..0c39b2cf 100644 --- a/compileunits.h +++ b/compileunits.h @@ -37,6 +37,7 @@ #include "sphere.cpp" #include "quotient.cpp" #include "crystal.cpp" +// #include "product.cpp" #include "reg3.cpp" #include "language.cpp" #include "cell.cpp" diff --git a/geom-exp.cpp b/geom-exp.cpp index b8ee5e4e..6ce1bf40 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -802,6 +802,10 @@ void showEuclideanMenu() { case 3: dialog::addSelItem(XLAT("Curvature"), XLAT("Sol"), 0); break; + + PROD( case gcProduct: + dialog::addSelItem(XLAT("Curvature"), XLAT("Product"), 0); + break; ) } dialog::display(); diff --git a/graph.cpp b/graph.cpp index 620acf0b..79429813 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5005,6 +5005,8 @@ void drawcell_in_radar(cell *c, transmatrix V) { #endif void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { + + PROD( if(product::pmap) { product::drawcell_stack(c, V, spinv, mirrored); return; } ) cells_drawn++; diff --git a/hyper.h b/hyper.h index df76f879..878cf9c3 100644 --- a/hyper.h +++ b/hyper.h @@ -328,7 +328,7 @@ extern videopar vid; #if MAXMDIM == 3 #define WDIM 2 #else -#define WDIM ((geometry >= gBinary3 && geometry != gBinary4 && geometry != gKiteDart2) ? 3 : 2) +#define WDIM ((geometry >= gBinary3 && geometry != gBinary4 && geometry != gKiteDart2 PROD(&& geometry != gProduct)) ? 3 : 2) #endif #define GDIM (vid.always3 ? 3 : WDIM) #define DIM GDIM diff --git a/hypgraph.cpp b/hypgraph.cpp index 6f75552d..640c5e22 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1871,6 +1871,8 @@ bool limited_generation(cell *c) { } bool do_draw(cell *c, const transmatrix& T) { + + PROD( if(product::pmap) return product::in_actual([&] { return do_draw(product::get_at(c, product::plevel), T); }); ) if(WDIM == 3) { if(cells_drawn > vid.cells_drawn_limit) return false; if(sol) diff --git a/rug.cpp b/rug.cpp index cd3cd326..20494be8 100644 --- a/rug.cpp +++ b/rug.cpp @@ -943,7 +943,7 @@ bincode acd_bin(ld x) { bincode get_bincode(hyperpoint h) { switch(ginf[gwhere].cclass) { - case gcEuclid: case gcSol: + case gcEuclid: case gcSol: PROD( case gcProduct: ) return acd_bin(h[0]) + acd_bin(h[1]) * sY + acd_bin(h[2]) * sZ; case gcHyperbolic: return acd_bin(hypot_d(3, h)); diff --git a/sysconfig.h b/sysconfig.h index d7a8abfb..4a2045b0 100644 --- a/sysconfig.h +++ b/sysconfig.h @@ -504,4 +504,7 @@ union SDL_Event; #define CAP_MEMORY_RESERVE (!ISMOBILE && !ISWEB) #endif +#define PROD(x) /* unimplemented */ +#define PROD2(x,y) /* unimplemented */ + #undef TRANSPARENT