-
Notifications
You must be signed in to change notification settings - Fork 5
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
add camera.set_position to TrackballCamera #166
add camera.set_position to TrackballCamera #166
Conversation
drafting because looking at the base camera, looks like there was already some architecture for this, just not implemented fully? yt_idv/yt_idv/cameras/base_camera.py Lines 74 to 87 in e093d4e
will see if it's a quick thing, cause i'd prefer to do thsi with traitlets. |
2b5be54
to
7371831
Compare
well getting this to work with traitlets has proven more confusing that I thought it would be... I think maybe the camera objects could use a bit of refactoring? so I'm undrafting this with the new function rather than getting traitlets to work, but @matthewturk if you have any ideas, definitely let me know. |
I think it absolutely could use some refactoring. I think that we probably want to get to a point where the state is stored in one place (like the view matrix) and then the others are backed out of it or something. But I'm not 100% sure. |
ya, that makes sense. i was getting confused about the possible dependencies and order of operations -- e.g., if you update the orientation in the trackball you need to re-calculate the position, but if you set the position you would need to update the orientation (and other matrices). so having a single state object of some kind would make a lot of sense. you think it's OK to merge this one in the meantime though? It'd help with the tests I'm adding in #159 |
I trust your judgment, yup! |
This adds a camera.set_position function so that the view_matrix will get updated when setting a position.
here's the result of the additional image i added to examples/amr_osmesa.py