1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-01-22 23:17:04 +00:00

set_view in 2D geometries

This commit is contained in:
Zeno Rogue 2021-04-07 01:11:12 +02:00
parent 937c7d4340
commit 41779cd92c

View File

@ -2902,6 +2902,12 @@ EX void shift_view_towards(shiftpoint H, ld l) {
}
EX void set_view(hyperpoint camera, hyperpoint forward, hyperpoint upward) {
if(WDIM == 2) {
View = gpushxto0(camera);
View = spin(90*degree) * spintox(View * upward) * View;
return;
}
transmatrix V = gpushxto0(camera);
forward = V * forward;
upward = V * upward;