From 6b262104fdb2257a5779319f215611beebd57bc7 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 15 Dec 2022 18:15:26 +0100 Subject: [PATCH] fixed vertical in embedded_plane in noniso --- hyperpoint.cpp | 6 +++++- hypgraph.cpp | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hyperpoint.cpp b/hyperpoint.cpp index 2f59fc69..ab64b715 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -1752,7 +1752,11 @@ EX hyperpoint xtangent(ld x) { return ctangent(0, x); } EX hyperpoint ztangent(ld z) { return ctangent(2, z); } /** tangent vector in logical direction Z */ -EX hyperpoint lztangent(ld z) { return ctangent(2, z); } +EX hyperpoint lztangent(ld z) { + if(geom3::hyp_in_solnih()) return ctangent(0, z); + if(geom3::euc_in_nil()) return ctangent(1, z); + return ctangent(2, z); + } /** change the length of the targent vector */ EX hyperpoint tangent_length(hyperpoint dir, ld length) { diff --git a/hypgraph.cpp b/hypgraph.cpp index f22c2603..cdcf6821 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1912,8 +1912,12 @@ EX hyperpoint vertical_vector() { hyperpoint h = iso_inverse(View) * C0; return View * (orthogonal_move(h, vid.wall_height) - h); } - if((WDIM == 2 || gproduct) && GDIM == 3 && vid.fixed_yz) - return get_view_orientation() * lztangent(1); + if(gproduct && vid.fixed_yz) { + return get_view_orientation() * lztangent(embedded_plane ? vid.wall_height : 1); + } + if(embedded_plane && vid.fixed_yz && nonisotropic) { + return NLP * lztangent(vid.wall_height); + } else if(ds.qty && gproduct) return get_view_orientation() * product::inverse_exp(ds.point); else if(ds.qty) @@ -2001,7 +2005,7 @@ EX void spinEdge(ld aspd) { } if(downspin > aspd) downspin = aspd; if(downspin < -aspd) downspin = -aspd; - rotate_view(spin(downspin)); + rotate_view(cspin(0, 1, downspin)); } /** \brief convert a shiftmatrix to the coordinate system of View