sph_in_low function

This commit is contained in:
Zeno Rogue 2022-12-15 21:03:20 +01:00
parent a20ee8e716
commit 6473ff8b45
3 changed files with 6 additions and 2 deletions

View File

@ -492,7 +492,7 @@ void geometry_information::make_skeletal(hpcshape& sh, ld push) {
hyperpoint yzspin(ld alpha, hyperpoint h) {
if(gproduct) return product::direct_exp(cspin(1, 2, alpha) * product::inverse_exp(h));
else if(embedded_plane && msphere && !sphere) {
else if(embedded_plane && geom3::sph_in_low()) {
h = gpushxto0(tile_center()) * h;
h = cspin(1, 2, alpha) * h;
h = rgpushxto0(tile_center()) * h;

View File

@ -1143,6 +1143,10 @@ EX namespace geom3 {
return ggclass() == gcHyperbolic && mgclass() == gcSphere;
}
EX bool sph_in_low() {
return mgclass() == gcSphere && among(ggclass(), gcHyperbolic, gcEuclid);
}
EX bool in_product() {
return ggclass() == gcProduct;
}

View File

@ -782,7 +782,7 @@ EX shiftmatrix face_the_player(const shiftmatrix V) {
return shiftless(cspin90(1, 2) * lrspintox(cspin90(2, 1) * uh) * xpush(hdist0(uh)) * cspin90(0, 2) * spin270());
}
#endif
if(embedded_plane && msphere && !sphere && !gproduct) return shiftless(map_relative_push(unshift(V * zpush0(1))) * zpush(-1));
if(embedded_plane && geom3::sph_in_low()) return shiftless(map_relative_push(unshift(V * zpush0(1))) * zpush(-1));
return rgpushxto0(tC0(V));
}