From d7d5f02a057991f77bed17e0ffb8c7ff9579c971 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 13 Jun 2019 17:03:32 +0200 Subject: [PATCH] 3D:: conformal::rotation is now used to get the initial rotation right in 3D --- geometry.cpp | 4 +++- hypgraph.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 55bada45..0c357a0b 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -391,6 +391,7 @@ void switch_always3() { if(rug::rugged) rug::close(); if(dual::split(switch_fpp)) return; check_cgi(); cgi.require_basics(); + View = inverse(conformal::rotmatrix()) * View; if(!vid.always3) { vid.always3 = true; ld ms = min(cgi.scalefactor, 1); @@ -422,8 +423,9 @@ void switch_always3() { swapmatrix(View); callhooks(hooks_swapdim); } + View = conformal::rotmatrix() * View; #endif - } + } } diff --git a/hypgraph.cpp b/hypgraph.cpp index 0b4cfd70..00d2e9ea 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1289,13 +1289,13 @@ void ballgeometry() { void resetview() { DEBBI(DF_GRAPH, ("reset view")); - View = Id; + View = conformal::rotmatrix(); // EUCLIDEAN if(!masterless) viewctr.at = cwt.at->master, viewctr.spin = cwt.spin; else centerover = cwt; - cwtV = Id; + cwtV = View; // SDL_LockSurface(s); // SDL_UnlockSurface(s); }