fixed some bugs with ultra mirrors

This commit is contained in:
Zeno Rogue 2020-05-28 13:44:02 +02:00
parent 384a6bb806
commit 91338d047e
3 changed files with 5 additions and 6 deletions

View File

@ -254,8 +254,6 @@ EX ld compute_around(bool setup) {
h2 = gpushxto0(u) * h2;
u = gpushxto0(u) * u;
reg3::compute_ultra();
ld x = hypot(h2[1], h2[2]);
ld y = h2[0];
return 360 / (90 + atan(y/x) / degree);
@ -279,6 +277,7 @@ EX void generate() {
cgi.spins[b] = ucgi.spins[b];
compute_around(true);
reg3::compute_ultra();
}
int get_middle() {
@ -371,8 +370,6 @@ void set_gfake(ld _around) {
compute_scale();
check_cgi();
auto& u = underlying_cgip;
ginf[gFake].xcode = no_code;
if(currentmap) new hrmap_fake(currentmap);
@ -399,7 +396,7 @@ EX void change_around() {
println(hlog, "scale = ", t, " -> ", scale, " range = ", range);
t = scale / t;
println(hlog, "t = ", t, " h distance = ", hypot_d(3, h));
// println(hlog, "t = ", t, " h distance = ", hypot_d(3, h), " for ", h);
h *= t;
View = rgpushxto0(direct_exp(h)) * T;
playermoved = false;

View File

@ -955,6 +955,7 @@ EX string cgi_string() {
if(euclid) V("E", fts(fake::scale));
if(sphere) V("S", fts(fake::scale));
V("G", FPIU(cgi_string()));
return s;
}
if(GOLDBERG) V("GP", its(gp::param.first) + "," + its(gp::param.second));

View File

@ -74,7 +74,8 @@ EX namespace reg3 {
c = normalize(c);
cgi.ultra_mirror_dist = hdist0(c);
}
cgi.ultra_mirrors.clear();
if(cgflags & qULTRA) for(auto v: cgi.vertices_only)
cgi.ultra_mirrors.push_back(rspintox(v) * xpush(cgi.ultra_mirror_dist*2) * MirrorX * spintox(v));
}