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

Camera ZoomFactor Management in Xbim Xplorer #217

Open
CCT-Mukund-Thakare opened this issue Jun 20, 2024 · 2 comments
Open

Camera ZoomFactor Management in Xbim Xplorer #217

CCT-Mukund-Thakare opened this issue Jun 20, 2024 · 2 comments

Comments

@CCT-Mukund-Thakare
Copy link

@andyward
I am curious and interested in knowing,
How Xbim Xplorer is managing zoom factor based for different sizes of models (small, large), so that we get smooth zooming in and zooming out behavior ?
I had very smooth zooming-in and zooming-out experience for both large and small models.
For large models, When camera is far away from viewer, zoom factor is be large, hence when we zoom-in camera speedily zoom's to the model.
And as camera starts getting close to model the zoom factor starts getting smaller and smaller so that it smoothly reach the model. How is Xbim Xplorer is managing this zoom factor so that, we get the smooth feeling of zoom in and zoom out.

Is camera zoom factor based on the distance between camera and model ?
Like when camera is far away then zoom factor is large and when it is closer the zoom factor is small, it this the idea behind it ?

Or is it based on the size of the bounding box ?
Like when bounding box is larger then zoom factor is large and when bounding box is smaller then zoom factor is small.

Let me know your thoughts on this.
Will be happy to know the idea you had used to manage this behavior.

Thank you !!

@andyward
Copy link
Member

I'm not that familiar with the Windows UI code base - @CBenghi may be have a more authorative answer. I know in WebUI we handle the relative zooming ourselves, but I suspect in Xplorer we're delegating it to the underlying Helix3D WPF control See Here. This is a bit more sophisticated as it includes concepts such as inertia.

@CCT-Mukund-Thakare
Copy link
Author

@andyward
Thank you for the link.
Also, How do you guys handle relative zooming in WebUI ?

Thank you !!

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