set_view in 2D geometries

This commit is contained in:
Zeno Rogue 2021-04-07 01:11:12 +02:00
parent 937c7d4340
commit 41779cd92c
1 changed files with 6 additions and 0 deletions

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;