Skip to content

[Feature Request] APIs for transfromation from screen space and right-handed transform matrix acquisition #8819

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

Open
kkaiwwana opened this issue Apr 8, 2025 · 0 comments

Comments

@kkaiwwana
Copy link

Is your feature request related to a problem? Please describe.
The exisiting API get_matrix of class Transform correctly returns left-handed transform matrix, however, when transforming points from screen space, the extra step that inverts aixs is required and unfortunately, the widely used operation that swaps axis as (x, y, z) -> (z', x', -y') from screen space to world space, seems to be incorrect, as discussed in #6719. It has caused countless issues, particularly when incorparating data from multiple timesteps. Besides, the transformation for right-handed system is also helpful, when user want to export data to non-left-handed system.

Describe the solution you'd like
I hope we can provide extra APIs, help making correct transformation from screen space easily, free them from swaping axis, including both to-left-handed and to-right-handed ones.

The existing, related APIs of class Transform are get_matrix() and get_inverse_matrix(). I want to implement following APIs get_matrix_from_screen_space(), get_inverted_matrix_to_scrren_space(), and also their alternatives for right-handed system, get_right_handed_matrix(), get_right_handed_inverse_matrix(), get_right_handed_matrix_from_screen_space(), get_right_handed_inverse_matrix_to_screen_space() (quite a LONG name, hope we can find better ones). For simplicity, their corresponding c++ methods are not listed.

These methods will have no conflicts with existing methods, and will not change the exisiting programs' behaviour, improving utility only.

Describe alternatives you've considered
None.

Additional context
None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant