From 794f8b679e66485729be28828d05280e7e1be47d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 31 Jul 2019 16:14:20 +0200 Subject: [PATCH] solv:: applymodel takes local_perspective into account --- hypgraph.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hypgraph.cpp b/hypgraph.cpp index 79c9c872..8384fdd7 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -313,6 +313,7 @@ void applymodel(hyperpoint H, hyperpoint& ret) { switch(pmodel) { case mdPerspective: { ld ratio = vid.xres / current_display->tanfov / current_display->radius / 2; + if(solv::local_perspective_used()) H = solv::local_perspective * H; ret[0] = H[0]/H[2] * ratio; ret[1] = H[1]/H[2] * ratio; ret[2] = 1; @@ -321,6 +322,7 @@ void applymodel(hyperpoint H, hyperpoint& ret) { case mdSolPerspective: { auto S = solv::inverse_exp(H, false); + if(solv::local_perspective_used()) S = solv::local_perspective * S; ld ratio = vid.xres / current_display->tanfov / current_display->radius / 2; ret[0] = S[0]/S[2] * ratio; ret[1] = S[1]/S[2] * ratio; @@ -343,6 +345,7 @@ void applymodel(hyperpoint H, hyperpoint& ret) { } case mdDisk: { + if(solv::local_perspective_used()) H = solv::local_perspective * H; ld tz = get_tz(H); if(!vid.camera_angle) { ret[0] = H[0] / tz;