New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve PanZoom camera performance when non-+z direction is used #1682
Conversation
… on each iteration rather than overwritten
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By removing the if statement aren't you now adding a penalty to the +z
case when it isn't needed?
My other thought is, is it possible to modify either the rect
or the main transform once whenever up
is set and then apply that to all calculations from then on? Or would that require a Rect
class that understands orientation? Just throwing ideas out there I haven't actually looked at the math very much.
I went back and forth on leaving the if statement and decided the computation was cheap enough that it was a good trade-off for simplifying the logic by removing the if statement. I like where you are going with only computing the up transform whenever it changes but I'm not seeing a straightforward way to do that at the moment. |
I'm having a hard time being ok with the I spent 30 minutes looking in to a different approach to this and I think it could be done, but has so many possible points of failure I'm a little worried. The |
What do you think about getting this merged @djhoese? I don't think my change is causing the failed CI test is it? I don't really understand the error there. |
Darn, I forgot about this. I really wanted to come up with a better overall solution that didn't need the extra logic for changing |
Sorry, forgot about this again. Thanks. |
Fixes #1681 by keeping a MatrixTransformation that gets modified on each iteration rather than overwritten