mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +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) {
|
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);
|
transmatrix V = gpushxto0(camera);
|
||||||
forward = V * forward;
|
forward = V * forward;
|
||||||
upward = V * upward;
|
upward = V * upward;
|
||||||
|
Loading…
Reference in New Issue
Block a user