1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-05 13:46:17 +00:00

solv:: added missing fixmatrix

This commit is contained in:
Zeno Rogue 2019-08-03 12:59:34 +02:00
parent 7eae04e2ea
commit 36dbe1d63b

10
sol.cpp
View File

@ -312,8 +312,18 @@ namespace solv {
return abs(h[0]) < solrange_xy && abs(h[1]) < solrange_xy && abs(h[2]) < solrange_z;
}
void fixmatrix(transmatrix& T) {
transmatrix push = eupush( tC0(T) );
transmatrix push_back = inverse(push);
transmatrix gtl = push_back * T;
{ dynamicval<eGeometry> g(geometry, gSphere); hr::fixmatrix(gtl); }
T = push * gtl;
}
transmatrix spt(transmatrix Pos, transmatrix T) {
solv::fixmatrix(Pos);
hyperpoint h = tC0(T);
h[3] = 0;