mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-09 15:39:55 +00:00
fixed_yz now works in all geometries where it makes sense
This commit is contained in:
parent
75f631cd40
commit
c22aeedde9
@ -3003,7 +3003,7 @@ EX void show3D() {
|
||||
});
|
||||
}
|
||||
|
||||
if(mproduct || embedded_plane)
|
||||
if(has_fixed_yz())
|
||||
dialog::addBoolItem_action(XLAT("fixed Y/Z rotation"), vid.fixed_yz, 'Z');
|
||||
|
||||
if(WDIM == 2 && GDIM == 3) {
|
||||
|
18
hypgraph.cpp
18
hypgraph.cpp
@ -2020,8 +2020,12 @@ void hrmap_standard::draw_at(cell *at, const shiftmatrix& where) {
|
||||
}
|
||||
}
|
||||
|
||||
EX bool has_fixed_yz() {
|
||||
return (embedded_plane || mhybrid || nil || euclid || sol || nih || (cgflags & qSTRETCHABLE) || (hyperbolic && bt::in()));
|
||||
}
|
||||
|
||||
EX bool keep_vertical() {
|
||||
if((WDIM == 2 || gproduct) && GDIM == 3 && vid.fixed_yz) return !CAP_ORIENTATION;
|
||||
if(vid.fixed_yz && has_fixed_yz()) return !CAP_ORIENTATION;
|
||||
if(downseek.qty) return true;
|
||||
return false;
|
||||
}
|
||||
@ -2033,9 +2037,19 @@ EX hyperpoint vertical_vector() {
|
||||
if(gproduct) Rot = NLP * Rot;
|
||||
return Rot * lztangent(vid.wall_height);
|
||||
}
|
||||
if(gproduct && vid.fixed_yz) {
|
||||
if(mproduct && vid.fixed_yz) {
|
||||
return get_view_orientation() * lztangent(1);
|
||||
}
|
||||
if(((cgflags & qSTRETCHABLE) || (mtwisted && sphere)) && vid.fixed_yz) {
|
||||
return stretch::itranslate(View * C0) * View * lztangent(1);
|
||||
}
|
||||
if((nil || euclid || sol || nih) && vid.fixed_yz) {
|
||||
return View * lztangent(1);
|
||||
}
|
||||
if(hyperbolic && bt::in() && vid.fixed_yz) {
|
||||
hyperpoint h = inverse(View) * C0;
|
||||
return View * parabolic13_at(deparabolic13(h)) * xtangent(1);
|
||||
}
|
||||
if(ds.qty && gproduct)
|
||||
return get_view_orientation() * product::inverse_exp(ds.point);
|
||||
if(ds.qty)
|
||||
|
Loading…
Reference in New Issue
Block a user