mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-27 02:20:36 +00:00
fixed radar in euc_in_sph (no animate), radar in euc_in_product (somewhat), fixed_YZ in euc_in_sph
This commit is contained in:
parent
742355433a
commit
763a932aca
@ -5098,6 +5098,9 @@ EX void make_actual_view() {
|
|||||||
|
|
||||||
current_display->radar_transform = R * zpush(z);
|
current_display->radar_transform = R * zpush(z);
|
||||||
}
|
}
|
||||||
|
else if(geom3::euc_in_sph()) {
|
||||||
|
current_display->radar_transform = inverse(View);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
transmatrix T = actual_view_transform * View;
|
transmatrix T = actual_view_transform * View;
|
||||||
transmatrix U = view_inverse(T);
|
transmatrix U = view_inverse(T);
|
||||||
|
@ -1910,7 +1910,7 @@ EX hyperpoint vertical_vector() {
|
|||||||
}
|
}
|
||||||
if(embedded_plane && geom3::same_in_same())
|
if(embedded_plane && geom3::same_in_same())
|
||||||
return get_view_orientation() * lztangent(vid.wall_height);
|
return get_view_orientation() * lztangent(vid.wall_height);
|
||||||
if(geom3::euc_in_sl2()) {
|
if(geom3::euc_in_sl2() || geom3::euc_in_sph()) {
|
||||||
transmatrix Rot = View * map_relative_push(inverse(View) * C0);
|
transmatrix Rot = View * map_relative_push(inverse(View) * C0);
|
||||||
return Rot * lztangent(vid.wall_height);
|
return Rot * lztangent(vid.wall_height);
|
||||||
}
|
}
|
||||||
|
22
radar.cpp
22
radar.cpp
@ -54,6 +54,28 @@ pair<bool, hyperpoint> makeradar(shiftpoint h) {
|
|||||||
if(d > vid.radarrange) return {false, h1};
|
if(d > vid.radarrange) return {false, h1};
|
||||||
if(d) h1 = h1 * (d / (vid.radarrange + cgi.scalefactor/4) / hypot_d(3, h1));
|
if(d) h1 = h1 * (d / (vid.radarrange + cgi.scalefactor/4) / hypot_d(3, h1));
|
||||||
}
|
}
|
||||||
|
else if(geom3::euc_in_sph()) {
|
||||||
|
h1[0] = atan2(h.h[0], h.h[2]);
|
||||||
|
h1[1] = atan2(h.h[1], h.h[3]);
|
||||||
|
h1[2] = 0;
|
||||||
|
h1 = cgi.intermediate_to_logical * h1;
|
||||||
|
d = hypot_d(2, h1);
|
||||||
|
if(d > vid.radarrange) return {false, h1};
|
||||||
|
if(d) h1 = h1 / (vid.radarrange + cgi.scalefactor/4);
|
||||||
|
}
|
||||||
|
else if(geom3::euc_in_product()) {
|
||||||
|
if(in_h2xe())
|
||||||
|
h1[0] = atanh(h.h[0] / h.h[2]);
|
||||||
|
else
|
||||||
|
h1[0] = atan2(h.h[2], h.h[0]);
|
||||||
|
h1[2] = - zlevel(h.h) - h.shift;
|
||||||
|
h1[1] = 0;
|
||||||
|
h1[3] = 0;
|
||||||
|
h1 = cgi.intermediate_to_logical * h1;
|
||||||
|
d = hypot_d(2, h1);
|
||||||
|
if(d > vid.radarrange) return {false, h1};
|
||||||
|
if(d) h1 = h1 / (vid.radarrange + cgi.scalefactor/4);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
d = hypot_d(2, h1);
|
d = hypot_d(2, h1);
|
||||||
if(d > vid.radarrange) return {false, h1};
|
if(d > vid.radarrange) return {false, h1};
|
||||||
|
Loading…
Reference in New Issue
Block a user