Skip to content
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

Trackball not working as in the classic SGI trackball implementation #1

Open
dov opened this issue Oct 19, 2019 · 2 comments
Open

Trackball not working as in the classic SGI trackball implementation #1

dov opened this issue Oct 19, 2019 · 2 comments

Comments

@dov
Copy link

dov commented Oct 19, 2019

For years I have been using trackball.[ch] from SGI for implementing 3D manipulation, that according its comment was written in 1988, and my brain has pretty much wrapped itself around its interaction. This code is available in multiple places on the net, e.g. in http://basilisk.fr/src/gl/ ,

So when I recently started playing around with Qt3D I was immediately annoyed with its camera interaction and looked around for a trackball implementation. I found your implementation, but unfortunately it is not behaving as the SGI trackball.

So I'm opening this issue with the hope that you'll try to mirror its interaction. I'd have a go at it myself, but I'm afraid that I'm not familiar enough with the QtCode yet.

@dov
Copy link
Author

dov commented Oct 19, 2019

I found the bug, and why I didn't get your implementation to work! You require that after the construction of the controller, you make a call to camController->setWindowSize(QSize(view->width(),view->height())); . Once I did this the behavior of the controller is indeed the same as the familiar trackball.c implementation. Of course I should connect this to the window resize slot.

You should add the above requirement to the documentation, or perhaps even through an exception if the window size has not been initialized.

Until this has been fixed, I take the liberty of keeping this bug open.

@nyue
Copy link

nyue commented Jul 13, 2022

Thank you @dov

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

2 participants