mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 07:27:07 +00:00
sph_in_low function
This commit is contained in:
parent
a20ee8e716
commit
6473ff8b45
@ -492,7 +492,7 @@ void geometry_information::make_skeletal(hpcshape& sh, ld push) {
|
|||||||
|
|
||||||
hyperpoint yzspin(ld alpha, hyperpoint h) {
|
hyperpoint yzspin(ld alpha, hyperpoint h) {
|
||||||
if(gproduct) return product::direct_exp(cspin(1, 2, alpha) * product::inverse_exp(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 = gpushxto0(tile_center()) * h;
|
||||||
h = cspin(1, 2, alpha) * h;
|
h = cspin(1, 2, alpha) * h;
|
||||||
h = rgpushxto0(tile_center()) * h;
|
h = rgpushxto0(tile_center()) * h;
|
||||||
|
@ -1143,6 +1143,10 @@ EX namespace geom3 {
|
|||||||
return ggclass() == gcHyperbolic && mgclass() == gcSphere;
|
return ggclass() == gcHyperbolic && mgclass() == gcSphere;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX bool sph_in_low() {
|
||||||
|
return mgclass() == gcSphere && among(ggclass(), gcHyperbolic, gcEuclid);
|
||||||
|
}
|
||||||
|
|
||||||
EX bool in_product() {
|
EX bool in_product() {
|
||||||
return ggclass() == gcProduct;
|
return ggclass() == gcProduct;
|
||||||
}
|
}
|
||||||
|
@ -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());
|
return shiftless(cspin90(1, 2) * lrspintox(cspin90(2, 1) * uh) * xpush(hdist0(uh)) * cspin90(0, 2) * spin270());
|
||||||
}
|
}
|
||||||
#endif
|
#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));
|
return rgpushxto0(tC0(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user