diff --git a/rogueviz/flocking.cpp b/rogueviz/flocking.cpp index ad0a34f5..6ccb4241 100644 --- a/rogueviz/flocking.cpp +++ b/rogueviz/flocking.cpp @@ -106,7 +106,7 @@ namespace flocking { transmatrix I, Rot; bool use_rot = true; - if(prod) { + if(mproduct) { I = inverse(m->at); Rot = inverse(m->ori); } @@ -204,7 +204,7 @@ namespace flocking { fixmatrix(pats[i]); /* RogueViz does not correctly rotate them */ - if(prod) { + if(mproduct) { hyperpoint h = oris[i] * xtangent(1); pats[i] = pats[i] * spin(-atan2(h[1], h[0])); oris[i] = spin(+atan2(h[1], h[0])) * oris[i]; @@ -234,7 +234,7 @@ namespace flocking { gmatrix.clear(); vdata[0].m->pat = shiftless(View * calc_relative_matrix(vdata[0].m->base, centerover, C0) * vdata[0].m->at); View = inverse(vdata[0].m->pat.T) * View; - if(prod) { + if(mproduct) { NLP = inverse(vdata[0].m->ori); NLP = hr::cspin90(1, 2) * spin90() * NLP; @@ -265,7 +265,7 @@ namespace flocking { vdata[i].m->pat = gmatrix[vdata[i].m->base] * vdata[i].m->at; auto h1 = unshift(tC0(vdata[i].m->pat)); cnt++; - if(prod) { + if(mproduct) { auto d1 = product_decompose(h1); lev += d1.first; h += d1.second; @@ -275,7 +275,7 @@ namespace flocking { } if(cnt) { h = normalize_flat(h); - if(prod) h = zshift(h, lev / cnt); + if(mproduct) h = orthogonal_move(h, lev / cnt); View = inverse(actual_view_transform) * gpushxto0(h) * actual_view_transform * View; shift_view(ztangent(follow_dist)); } diff --git a/rogueviz/highdim-demo.cpp b/rogueviz/highdim-demo.cpp index df2de4bc..361ffcaf 100644 --- a/rogueviz/highdim-demo.cpp +++ b/rogueviz/highdim-demo.cpp @@ -124,7 +124,7 @@ void create_sokowalls(cell *c) { hyperpoint h0 = get_corner_position(c, b); hyperpoint h1 = get_corner_position(c, b+1); hyperpoint h2 = normalize(h0 * (qfr-fr) + h1 * fr); - return mscale(h2, 1 / (1 - a / 6.1)); + return orthogonal_move_fol(h2, 1 / (1 - a / 6.1)); }; for(int a=0; a<9; a++) diff --git a/rogueviz/hypcity.cpp b/rogueviz/hypcity.cpp index 6d170da9..2d8c8152 100644 --- a/rogueviz/hypcity.cpp +++ b/rogueviz/hypcity.cpp @@ -57,7 +57,7 @@ void prepare_tf() { hx[3] = 1; if(hyperbolic) hx = spin(45._deg) * hx; hx = normalize(hx); - hx = zshift(hx, h[2]*(t*(sphere ? 3 : 7))); + hx = orthogonal_move(hx, h[2]*(t*(sphere ? 3 : 7))); return {0, hx}; } diff --git a/rogueviz/intra-demos.cpp b/rogueviz/intra-demos.cpp index 11c1d74b..d675b6a3 100644 --- a/rogueviz/intra-demos.cpp +++ b/rogueviz/intra-demos.cpp @@ -20,14 +20,14 @@ void set_wall(cell *c, color_t col) { map plane; cellwalker flatspin(cellwalker cw, int i) { - if(hybri && cw.spin < cw.at->type - 2) + if(mhybrid && cw.spin < cw.at->type - 2) cw.spin = gmod(cw.spin + (cw.mirrored ? -i : i), cw.at->type - 2); return cw; } cellwalker gstrafe(cellwalker cw, int i) { if(reg3::in()) return currentmap->strafe(cw, i); - if(prod) { + if(mproduct) { if(i == cw.at->type-2 || i == cw.at->type-1) return cellwalker(cw.at->move(i), cw.spin); else for(int k: {-1, 1}) diff --git a/rogueviz/qtm.cpp b/rogueviz/qtm.cpp index 670c2b2c..ca7ab560 100644 --- a/rogueviz/qtm.cpp +++ b/rogueviz/qtm.cpp @@ -30,7 +30,7 @@ color_t rainbow_color_at(hyperpoint h) { } void set_cell(cell *c) { - if(hybri) { + if(mhybrid) { cell *c1 = hybrid::get_where(c).first; if(c1->land != laHive) hybrid::in_underlying_geometry([&] { set_cell(c1); }); c->land = c1->land; diff --git a/rogueviz/rogueviz.cpp b/rogueviz/rogueviz.cpp index ff2798b3..a75f927f 100644 --- a/rogueviz/rogueviz.cpp +++ b/rogueviz/rogueviz.cpp @@ -452,7 +452,7 @@ void queuedisk(const shiftmatrix& V, const colorpair& cp, bool legend, const str queuepolyat(V, sh, 0x80, PPR::MONSTER_SHADOW); poly_outline = p; if(info) queueaction(PPR::MONSTER_HEAD, [info] () { SVG_LINK(*info); }); - queuepolyat(V1 = mscale(V, cgi.BODY), sh, darken_a(cp.color1), PPR::MONSTER_HEAD); + queuepolyat(V1 = orthogonal_move_fol(V, cgi.BODY), sh, darken_a(cp.color1), PPR::MONSTER_HEAD); if(info) queueaction(PPR::MONSTER_HEAD, [] () { SVG_LINK(""); }); } else { diff --git a/rogueviz/sag.cpp b/rogueviz/sag.cpp index d7760339..309a8e35 100644 --- a/rogueviz/sag.cpp +++ b/rogueviz/sag.cpp @@ -635,7 +635,7 @@ namespace sag { ld pdist(hyperpoint hi, hyperpoint hj) { if(sol) return min(geo_dist(hi, hj), geo_dist(hj, hi)); - if(prod && angular) { + if(mproduct && angular) { auto di = product_decompose(hi); auto dj = product_decompose(hj); @@ -1146,7 +1146,7 @@ void geo_stats() { out("nodes", isize(sagcells)); out("maxsagdist", max_sag_dist); out("dim", (euclid && WDIM == 2 && euc::eu.user_axes[1][1] == 1) ? 1 : WDIM); - out("geometry", S3 >= OINF ? "tree" : hyperbolic ? "hyperbolic" : sphere ? "sphere" : euclid ? "euclid" : nil ? "nil" : sol ? "solv" : prod ? "product" : "other"); + out("geometry", S3 >= OINF ? "tree" : hyperbolic ? "hyperbolic" : sphere ? "sphere" : euclid ? "euclid" : nil ? "nil" : sol ? "solv" : mproduct ? "product" : "other"); out("closed", max_sag_dist == isize(sagcells) ? 0 : closed_manifold ? 1 : 0); out("angular", angular); for(int p: {1, 10, 50}) { out(format("sagdist%02d", p), sorted_sagdist[(p * sorted_sagdist.size()) / 100]); } diff --git a/rogueviz/smoothcam.cpp b/rogueviz/smoothcam.cpp index ad42df72..060e6a9b 100644 --- a/rogueviz/smoothcam.cpp +++ b/rogueviz/smoothcam.cpp @@ -423,7 +423,7 @@ void show() { } void prepare_for_interpolation(hyperpoint& h) { - if(prod) { + if(gproduct) { h[3] = zlevel(h); ld t = exp(h[3]); h[0] /= t; @@ -433,7 +433,7 @@ void prepare_for_interpolation(hyperpoint& h) { } void after_interpolation(hyperpoint& h) { - if(prod) { + if(gproduct) { ld v = exp(h[3]) / sqrt(abs(intval(h, Hypc))); h[0] *= v; h[1] *= v; diff --git a/rogueviz/snow.cpp b/rogueviz/snow.cpp index 62995432..f7fb8124 100644 --- a/rogueviz/snow.cpp +++ b/rogueviz/snow.cpp @@ -83,11 +83,11 @@ transmatrix random_snow_matrix(cell *c) { h[2] = -h[2]; return rgpushxto0(h); } - else if(prod) { + else if(mproduct) { transmatrix T = PIU(random_snow_matrix(c)); - return mscale(T, (randd() - .5) * cgi.plevel); + return orthogonal_move(T, (randd() - .5) * cgi.plevel); } - else if(hybri && !prod) { + else if(mhybrid && !mproduct) { return rots::lift_matrix(PIU(random_snow_matrix(c))); // * zpush((randd() - .5) * cgi.plevel); } else if(nonisotropic || bt::in()) {