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

make Arcball take vec2 instead of ivec2 #1106

Closed
araid opened this issue Sep 9, 2015 · 4 comments
Closed

make Arcball take vec2 instead of ivec2 #1106

araid opened this issue Sep 9, 2015 · 4 comments

Comments

@araid
Copy link
Contributor

araid commented Sep 9, 2015

I often use Arcball to easily rotate 3D objects from the camera perspective. I call it from a variety of inputs other than the mouse, like touch, Leap motion or just keyboard.

The fact that mouseDrag takes an ivec2 causes small rotations to be choppy due to integer rounding, as you can see here: https://gist.github.com/araid/274bf3f2bc6b4ece2ea7
That would be fixed by using vec2 instead, and it wouldn't break anything.

In fact I would just rename all of its methods to get rid of the "mouse" part, since the class doesn't seem exclusive to mouse to me, but that's not really important.

@notlion
Copy link
Contributor

notlion commented Sep 9, 2015

Also, at least on OS X mouse position is represented as floats and inputs like graphics tablets set the cursor to sub pixel positions.

@axjxwright
Copy link
Contributor

If this goes through, can it be applied to CameraUi as well?

@andrewfb
Copy link
Collaborator

This makes sense to me, and I think the CameraUi change would too. Anybody up for a PR to this effect?

@andrewfb
Copy link
Collaborator

andrewfb commented Nov 9, 2015

Should be fixed by @lithium-snepo's commit above.

@andrewfb andrewfb closed this as completed Nov 9, 2015
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

4 participants