1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-31 22:12:59 +00:00

adjusting for 3D part II

This commit is contained in:
?
2019-02-22 20:58:40 +01:00
committed by Zeno Rogue
parent aa3e14549e
commit 56d628d4d8
9 changed files with 188 additions and 146 deletions

View File

@@ -362,7 +362,11 @@ void virtualRebase(cell*& base, transmatrix& at, bool tohex) {
void virtualRebase(cell*& base, hyperpoint& h, bool tohex) {
// we perform fixing in check, so that it works with larger range
virtualRebase(base, h, tohex, [] (const hyperpoint& h) { return hyperbolic ? hpxy(h[0], h[1] DC(,h[2])) :h; });
virtualRebase(base, h, tohex, [] (const hyperpoint& h) {
if(hyperbolic && DIM == 2) return hpxy(h[0], h[1]);
if(hyperbolic && DIM == 3) return hpxy3(h[0], h[1], h[2]);
return h;
});
}
// works only in geometries similar to the standard one, and only on heptagons
@@ -436,8 +440,8 @@ hyperpoint randomPointIn(int t) {
}
#if CAP_BT
hyperpoint get_horopoint(ld y, ld x DC(,ld z)) {
return xpush(-y) * binary::parabolic(x,z) * C0;
hyperpoint get_horopoint(ld y, ld x) {
return xpush(-y) * binary::parabolic(x) * C0;
}
#endif