mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
rogueviz::smoothcam:: better distance reporting
This commit is contained in:
parent
40f2f60b83
commit
7438445178
@ -238,7 +238,24 @@ void show() {
|
||||
int id = 0;
|
||||
for(auto& f: anim.frames) {
|
||||
labels[f.where][inverse(f.sView) * C0] = f.title;
|
||||
dialog::addSelItem(f.title + " [" + its(celldistance(f.where, centerover)) + "]", fts(f.interval), key++);
|
||||
string dist;
|
||||
|
||||
if(f.where != centerover)
|
||||
dist = its(celldistance(f.where, centerover)) + " cells";
|
||||
else {
|
||||
hyperpoint h1 = tC0(iso_inverse(View));
|
||||
hyperpoint h2 = tC0(iso_inverse(f.sView));
|
||||
ld d = hdist(h1, h2);
|
||||
if(d > 1e-3)
|
||||
dist = fts(d) + "au";
|
||||
else {
|
||||
transmatrix T = f.sView * iso_inverse(View);
|
||||
println(hlog, "T = ", T);
|
||||
dist = fts(acos_clamp(T[2][2])) + "°/" + fts(acos_clamp(T[1][1])) + "°";
|
||||
}
|
||||
}
|
||||
|
||||
dialog::addSelItem(f.title + " [" + dist + "]", fts(f.interval), key++);
|
||||
dialog::add_action_push([&anim, id] { edit_step(anim, id); });
|
||||
id++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user