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

Can I set the rotate center to a point not the center of render view? #773

Closed
timeanddoctor opened this issue Dec 29, 2022 · 3 comments
Closed

Comments

@timeanddoctor
Copy link

timeanddoctor commented Dec 29, 2022

from vedo import Plotter, Cube

def callbck(evt):
    if evt.actor:
        #plt.fly_to(evt.picked3d)
        plt.camera.SetFocalPoint(evt.picked3d)

plt = Plotter(axes=1)
plt.addCallback("LeftButtonPress", callbck)

c1 = Cube()
plt.show(c1)

If I changed the focal of the camera but the render would fly to the center of point.

@timeanddoctor
Copy link
Author

timeanddoctor commented Dec 29, 2022

image

Thanks

@timeanddoctor
Copy link
Author

Can I set the rotate center not as the camera focal position?

@marcomusy
Copy link
Owner

Uhm - sorry I not sure I understand what you're trying to achieve, but I cannot see a different of doing it other than setting the camera properties (SetFocalPoint etc) as you are already doing it.
You can change to
plt.add_callback("Interaction", callbck)
to trigger the callback continuously (comment out the if statement too).

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