1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-04 21:26:17 +00:00

added rotation_yz (not editable)

This commit is contained in:
Zeno Rogue 2019-06-11 10:19:49 +02:00
parent 69de3354fe
commit c1f69187e4

View File

@ -274,6 +274,7 @@ namespace conformal {
int bandsegment = 16000; int bandsegment = 16000;
ld rotation = 0; ld rotation = 0;
ld rotation_xz = 90; ld rotation_xz = 90;
ld rotation_yz = 0;
int do_rotate = 1; int do_rotate = 1;
ld model_orientation, halfplane_scale, model_orientation_yz; ld model_orientation, halfplane_scale, model_orientation_yz;
ld clip_min, clip_max; ld clip_min, clip_max;
@ -392,8 +393,13 @@ namespace conformal {
v[ph+1]->at * C0; v[ph+1]->at * C0;
View = xpush(-(phase-ph) * hdist(now, next)) * View; View = xpush(-(phase-ph) * hdist(now, next)) * View;
if(DIM == 2) if(WDIM == 2) {
View = spin(rotation * degree) * View; View = spin(rotation * degree) * View;
if(DIM == 3) {
View = cspin(0, 2, -rotation_xz * degree) * View;
View = cspin(1, 2, -rotation_yz * degree) * View;
}
}
else { else {
if(celldistance(v[ph]->base, old->c7) <= 2) { if(celldistance(v[ph]->base, old->c7) <= 2) {
hyperpoint h1 = View * currentmap->relative_matrix(old, viewctr.at) * hpxy3(1,2,3); hyperpoint h1 = View * currentmap->relative_matrix(old, viewctr.at) * hpxy3(1,2,3);
@ -1227,6 +1233,7 @@ namespace conformal {
PHASEFROM(2); PHASEFROM(2);
shift_arg_formula(conformal::rotation); shift_arg_formula(conformal::rotation);
if(DIM == 3) shift_arg_formula(conformal::rotation_xz); if(DIM == 3) shift_arg_formula(conformal::rotation_xz);
if(DIM == 3) shift_arg_formula(conformal::rotation_yz);
} }
else if(argis("-playerpath")) { else if(argis("-playerpath")) {
conformal::create_playerpath(); conformal::create_playerpath();