I made some updates to my camera pose estimation engine the other day, to account for better (and correct) inverse functions for my matrix class. I went a little further with the updates and have now also updated my viewport render engine for The Dark Room.
I wrote my viewport render engine before I wrote my matrix class. So it had a bunch of functions in there, effectively doing the same thing my custom matrix class now does. And the object containers were a little different. So I converted these objects over to my matrix class objects, and have removed the functions doing matrix math from the render engine. I now use my matrix class for the viewport draw matrix stuff.
Doing this has saved me 241 lines of code, for the viewport engine.
I also made some of the function calls a little more efficient by removing some passed variables. I noticed I was passing some that were a little unnecessary, so they've been removed. It won't save much but still, makes the code a little cleaner and function calls a little easier to make and follow.
I'm still researching how to do image plane distortion correction, though not really finding anything of much help.