diff --git a/bigstuff.cpp b/bigstuff.cpp index 9fd5910f..d01a540a 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -49,7 +49,7 @@ EX int celldistAltRelative(cell *c) { if(cryst) return crystal::dist_relative(c); #endif #if MAXMDIM >= 4 - if(euclid && WDIM == 3) return euclid3::dist_relative(c); + if(euclid && WDIM == 3) return euc::dist_relative(c); #endif if(euclid && quotient) return celldistAlt(c) - roundTableRadius(c); if(sphere || quotient) { diff --git a/cell.cpp b/cell.cpp index 37323c18..6c0aa6e1 100644 --- a/cell.cpp +++ b/cell.cpp @@ -276,7 +276,7 @@ EX void initcells() { #if CAP_ARCM else if(archimedean) currentmap = arcm::new_map(); #endif - else if(euclid && !penrose) currentmap = euclid3::new_map(); + else if(euclid && !penrose) currentmap = euc::new_map(); #if CAP_BT else if(penrose) currentmap = kite::new_map(); #endif @@ -487,7 +487,7 @@ EX int celldistAlt(cell *c) { return celldist(c) - 3; } #if MAXMDIM >= 4 - if(euclid && WDIM == 3) return euclid3::dist_alt(c); + if(euclid && WDIM == 3) return euc::dist_alt(c); if(hyperbolic && WDIM == 3) return reg3::altdist(c->master); #endif if(!c->master->alt) return 0; @@ -1043,7 +1043,7 @@ EX int celldistance(cell *c1, cell *c2) { #if MAXMDIM >= 4 if(euclid && !penrose && !archimedean) - return euclid3::celldistance(c1, c2); + return euc::celldistance(c1, c2); if(hyperbolic && WDIM == 3) return reg3::celldistance(c1, c2); #endif diff --git a/crystal.cpp b/crystal.cpp index f4076327..347d9bbe 100644 --- a/crystal.cpp +++ b/crystal.cpp @@ -640,7 +640,7 @@ EX color_t colorize(cell *c, char whichCanvas) { } #endif else if(euclid) { - auto tab = euclid3::get_ispacemap()[c->master]; + auto tab = euc::get_ispacemap()[c->master]; for(int a=0; a<3; a++) co[a] = tab[a]; if(PURE) for(int a=0; a<3; a++) co[a] *= 2; dim = 3; @@ -1497,11 +1497,11 @@ EX void may_place_compass(cell *c) { #if CAP_CRYSTAL && MAXMDIM >= 4 -euclid3::coord crystal_to_euclid(coord x) { - return euclid3::coord(x[0]/2, x[1]/2, x[2]/2); +euc::coord crystal_to_euclid(coord x) { + return euc::coord(x[0]/2, x[1]/2, x[2]/2); } -coord euclid3_to_crystal(euclid3::coord x) { +coord euclid3_to_crystal(euc::coord x) { coord res; for(int i=0; i<3; i++) res[i] = x[i] * 2; for(int i=3; ihcoords) { auto co = crystal_to_euclid(p.second); @@ -1584,9 +1584,9 @@ void transform_euclid_to_crystal () { auto m = new hrmap_crystal; auto infront = cwt.cpeek(); - auto& spacemap = euclid3::get_spacemap(); - auto& ispacemap = euclid3::get_ispacemap(); - auto& camelot_center = euclid3::get_camelot_center(); + auto& spacemap = euc::get_spacemap(); + auto& ispacemap = euc::get_ispacemap(); + auto& camelot_center = euc::get_camelot_center(); for(auto& p: ispacemap) { auto co = euclid3_to_crystal(p.second); diff --git a/euclid.cpp b/euclid.cpp index 071e163e..cfa2df8d 100644 --- a/euclid.cpp +++ b/euclid.cpp @@ -60,7 +60,7 @@ EX namespace euc { break; default: - printf("euclid3::get_shifttable() called in geometry that is not euclid3"); + printf("euc::get_shifttable() called in geometry that is not euclid3"); exit(1); } @@ -119,7 +119,7 @@ EX namespace euc { EX torus_config eu_input, eu_edit; EX torus_config_full eu; - struct hrmap_euclid3 : hrmap_standard { + struct hrmap_euclidean : hrmap_standard { vector shifttable; vector tmatrix; map spacemap; @@ -140,7 +140,7 @@ EX namespace euc { return hrmap::allcells(); } - hrmap_euclid3() { + hrmap_euclidean() { shifttable = get_shifttable(); tmatrix.resize(S7); for(int i=0; ic7 = newCell(S7, h); else - irr::link_to_base(h, ((hrmap_euclid3*)irr::base)->get_at(at)); + irr::link_to_base(h, ((hrmap_euclidean*)irr::base)->get_at(at)); h->distance = 0; h->cdata = NULL; h->alt = NULL; @@ -285,11 +285,11 @@ EX namespace euc { } }; - hrmap_euclid3* cubemap() { - return ((hrmap_euclid3*) currentmap); + hrmap_euclidean* cubemap() { + return ((hrmap_euclidean*) currentmap); } - hrmap_euclid3* eucmap() { return cubemap(); } + hrmap_euclidean* eucmap() { return cubemap(); } EX vector& get_current_shifttable() { return cubemap()->shifttable; } EX map& get_spacemap() { return cubemap()->spacemap; } @@ -297,7 +297,7 @@ EX namespace euc { EX cell *& get_camelot_center() { return cubemap()->camelot_center; } EX hrmap* new_map() { - return new hrmap_euclid3; + return new hrmap_euclidean; } EX transmatrix move_matrix(heptagon *h, int i) { @@ -394,11 +394,11 @@ EX namespace euc { cell *start = m->gamestart(); if(!cc) { cc = start; - while(euclid3::celldistance(cc, start) < r + 5) + while(euc::celldistance(cc, start) < r + 5) cc = cc->cmove(hrand(cc->type)); } - return euclid3::celldistance(cc, c) - r; + return euc::celldistance(cc, c) - r; } /* quotient spaces */ @@ -1127,10 +1127,6 @@ EX int cyldist(gp::loc a, gp::loc b) { EX } -#if HDR -namespace euclid3 { using namespace euc; } -#endif - EX gp::loc euc2_coordinates(cell *c) { return euc::full_coords2(c); } } diff --git a/geom-exp.cpp b/geom-exp.cpp index f8cb9a62..f9e81981 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -470,8 +470,8 @@ EX void select_quotient_screen() { EX void select_quotient() { if(euclid && !penrose && !archimedean) { - euclid3::prepare_torus3(); - pushScreen(euclid3::show_torus3); + euc::prepare_torus3(); + pushScreen(euc::show_torus3); } else if(nil) { nilv::prepare_niltorus3(), @@ -585,7 +585,7 @@ EX void showEuclideanMenu() { } if(euclid && bounded) { - worldsize = euclid3::eu.det; + worldsize = euc::eu.det; if(BITRUNCATED) worldsize *= (a4 ? 2 : 3); if(GOLDBERG) worldsize *= cgi.gpdata->area; if(IRREGULAR) worldsize *= isize(irr::cells) / isize(irr::cells_of_heptagon); diff --git a/help.cpp b/help.cpp index 62f70169..2e1a8078 100644 --- a/help.cpp +++ b/help.cpp @@ -822,7 +822,7 @@ EX void describeMouseover() { } if(euclid && cheater && WDIM == 3) { - auto co = euclid3::get_ispacemap()[c->master]; + auto co = euc::get_ispacemap()[c->master]; out += " (" + its(co[0]); for(int i=1; iwall = (c->master->zebraval & 1) ? waCavewall : waCavefloor; #if MAXMDIM >= 4 else if(euclid && WDIM == 3) - c->wall = euclid3::get_emerald(c) ? waCavewall : waCavefloor; + c->wall = euc::get_emerald(c) ? waCavewall : waCavefloor; #endif else if(euclid) { auto co = euc2_coordinates(c); @@ -2654,7 +2654,7 @@ EX void setdist(cell *c, int d, cell *from) { else if(cryst) crystal::set_land(c); #endif #if MAXMDIM == 4 - else if(euclid && WDIM == 3) euclid3::set_land(c); + else if(euclid && WDIM == 3) euc::set_land(c); #endif else if(hybri) setLandHybrid(c); else if(sphere || (euclid && bounded)) setLandSphere(c); diff --git a/models.cpp b/models.cpp index 2114f008..9dd9f61e 100644 --- a/models.cpp +++ b/models.cpp @@ -268,7 +268,7 @@ EX namespace models { for(int x=-200; x<=200; x++) { if(y == 0 && x <= 0) continue; auto zero = euc::canonicalize(euc::to_coord(gp::loc{x, y})); - if(zero == euclid3::euzero) + if(zero == euc::euzero) torus_zeros.emplace_back(x, y); } sort(torus_zeros.begin(), torus_zeros.end(), [] (const gp::loc p1, const gp::loc p2) { diff --git a/pattern2.cpp b/pattern2.cpp index 9b1ab221..07d1965e 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1393,7 +1393,7 @@ EX bool pseudohept(cell *c) { #if MAXMDIM == 4 if(WDIM == 3) { if(geometry == gField435) return false; - else if(euclid) return euclid3::pseudohept(c); + else if(euclid) return euc::pseudohept(c); else return reg3::pseudohept(c); } #endif diff --git a/polygons.cpp b/polygons.cpp index 92935283..55789806 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -966,7 +966,7 @@ void geometry_information::create_wall3d() { } if(GDIM == 3 && euclid && S7 == 12) { - auto v = euclid3::get_shifttable(); + auto v = euc::get_shifttable(); for(int w=0; w<12; w++) { auto co = v[w]; vector valid; @@ -979,7 +979,7 @@ void geometry_information::create_wall3d() { } if(GDIM == 3 && euclid && S7 == 14) { - auto v = euclid3::get_shifttable(); + auto v = euc::get_shifttable(); for(int w=0; w<14; w++) { bshape(shWall3D[w], PPR::WALL); if(w%7 < 3) { diff --git a/racing.cpp b/racing.cpp index e586716d..23a64608 100644 --- a/racing.cpp +++ b/racing.cpp @@ -1081,7 +1081,7 @@ void race_projection() { }; if(!alternate) { - add_thurston_race(XLAT("Euclidean"), [] { stop_game(); euclid3::clear_torus3(); set_geometry(gBitrunc3); }); + add_thurston_race(XLAT("Euclidean"), [] { stop_game(); euc::clear_torus3(); set_geometry(gBitrunc3); }); add_thurston_race(XLAT("hyperbolic"), [] { set_geometry(gBinary3); vid.texture_step = 4; }); add_thurston_race(XLAT("spherical"), [] { set_geometry(gCell120); }); add_thurston_race(XLAT("Solv geometry"), [] { solnihv::solrange_xy = 10; solnihv::solrange_z = 3; set_geometry(gSol); });