iso_inverse for nil

This commit is contained in:
Zeno Rogue 2020-09-16 17:35:16 +02:00
parent 9aae9112bc
commit b8abcf6c11
1 changed files with 7 additions and 0 deletions

View File

@ -1001,6 +1001,13 @@ EX transmatrix iso_inverse(const transmatrix& T) {
return pseudo_ortho_inverse(T);
if(sphere)
return ortho_inverse(T);
if(nil) {
transmatrix U = Id;
U[2][LDIM] = T[0][LDIM] * T[1][LDIM] - T[2][LDIM];
U[1][LDIM] = -T[1][LDIM];
U[2][1] = U[0][LDIM] = -T[0][LDIM];
return U;
}
if(euclid && !(cgflags & qAFFINE)) {
transmatrix U = Id;
for(int i=0; i<MDIM-1; i++)