3d:: 2D/3D is now selectable at runtime

This commit is contained in:
?
2019-09-12 22:38:40 +02:00
committed by Zeno Rogue
parent 1f8510bc71
commit d08e58f404
17 changed files with 206 additions and 230 deletions
+4 -3
View File
@@ -599,14 +599,15 @@ void init() {
hyperpoint gltopoint(const glvertex& t) {
hyperpoint h;
h[0] = t[0]; h[1] = t[1]; h[2] = t[2]; h[3] = t[3];
// if(DIM == 3) h[3] = 0;
h[0] = t[0]; h[1] = t[1]; h[2] = t[2];
if(SHDIM == 4 && MAXDIM == 4) h[3] = t[3];
return h;
}
glvertex pointtogl(const hyperpoint& t) {
glvertex h;
h[0] = t[0]; h[1] = t[1]; h[2] = t[2]; h[3] = t[3];
h[0] = t[0]; h[1] = t[1]; h[2] = t[2];
if(SHDIM == 4) h[3] = (DIM == 3) ? t[3] : 1;
return h;
}