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:
parent
937c7d4340
commit
41779cd92c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user