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

Unable to zoom using dolly when it's orthographic #1429

Open
Nokse22 opened this issue May 20, 2024 · 2 comments
Open

Unable to zoom using dolly when it's orthographic #1429

Nokse22 opened this issue May 20, 2024 · 2 comments
Labels
source:libf3d type:enhancement New feature or request

Comments

@Nokse22
Copy link
Contributor

Nokse22 commented May 20, 2024

Is your feature request related to a problem? Please describe.
When it's in perspective I zoom using dolly, so moving the camera closer, but when it's orthographic it's not possible to zoom.

Describe the solution you'd like

  • A generic function to zoom, that handles both orthographic and perspective
  • Exposing VtkCamera.SetParallelScale to change the zoom in orthographic. This is what it's done in the app here
  • A function only to zoom when orthographic similar to the other functions where you only pass the delta and not the final value
  • Recompute the parallel scale internally when Dolly(), SetPosition(), and SetFocalPoint() are called if the camera is orthographic (and any other methods that affect the position-focal distance), this would not change the API

Also a function to be able to save the settings without rendering would be possible, because it would let me change to perspective, save, dolly and change back. Now it needs to render to be able to save.

Additional context
This is what I have done to make it work:
https://github.com/Nokse22/Exhibit/blob/3f6b2118d0365da4eeab1e8cc87d760cb5c54dbd/src/window.py#L190-L194

@mwestphal
Copy link
Contributor

wdyt @Meakk ?

@mwestphal mwestphal added type:enhancement New feature or request source:libf3d labels May 20, 2024
@snoyer
Copy link
Contributor

snoyer commented May 20, 2024

for reference:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source:libf3d type:enhancement New feature or request
Projects
Status: Investigate
Development

No branches or pull requests

3 participants