mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
3D version of tmtogl_transpose
This commit is contained in:
parent
33f17e345a
commit
f3035bb1f5
12
glhr.cpp
12
glhr.cpp
@ -172,6 +172,18 @@ EX glmatrix tmtogl_transpose(const transmatrix& T) {
|
||||
return tmp;
|
||||
}
|
||||
|
||||
EX glmatrix tmtogl_transpose3(const transmatrix& T) {
|
||||
glmatrix tmp;
|
||||
for(int i=0; i<4; i++)
|
||||
for(int j=0; j<4; j++)
|
||||
tmp[i][j] = T[j][i];
|
||||
if(MDIM == 3)
|
||||
for(int i=0; i<4; i++)
|
||||
for(int j=0; j<4; j++)
|
||||
if(i == 3 || j == 3) tmp[j][i] = 0;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
EX glmatrix ortho(ld x, ld y, ld z) {
|
||||
return scale(1/x, 1/y, 1/z);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user