fixed vertical in embedded_plane in noniso

This commit is contained in:
Zeno Rogue 2022-12-15 18:15:26 +01:00
parent 3233ecbfde
commit 6b262104fd
2 changed files with 12 additions and 4 deletions

View File

@ -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) {

View File

@ -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