From 5bdae7187947524d900b4149fc18bc387f4939c5 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 10 Feb 2023 19:05:47 +0100 Subject: [PATCH] rogueviz/smoothcam: used swapmatrix_iview and swapmatrix_view --- rogueviz/smoothcam.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rogueviz/smoothcam.cpp b/rogueviz/smoothcam.cpp index 3194ff58..fcb6f944 100644 --- a/rogueviz/smoothcam.cpp +++ b/rogueviz/smoothcam.cpp @@ -684,4 +684,17 @@ auto hooks = arg::add3("-smoothcam", enable_and_show) } }); +auto hooksw = addHook(hooks_swapdim, 100, [] { + println(hlog, "swapping animation"); + indenter id(2); + for(auto& anim: anims) { + anim.start = Id; + for(auto& f: anim.frames) { + transmatrix NLP = inverse(f.ori); + swapmatrix_iview(f.ori, f.V); + swapmatrix_view(NLP, f.sView); + } + } + }); + }}