Skip to main content

Zoom to all

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2012-08-30


I'm triying to develop a method which allows me to zoom out automatically until all my drawn spheres are visible. I don't want to move the camera/eye backwards.
My idea was to get the screen coordinates (unit of pixels) of each sphere and check whether it is within the bounds of the Canvas3D or not. I calculate the screen coordinates with getPixelLocationFromImagePlate, this works. If not all spheres are within the bounds, I do a zoom step.

Unfortunately, getPixelLocationFromImagePlate doesn't care for MouseZoom! Can this behaviour be edited?

And another fact catched my eye: if I call the mehtod getHeight() of the Canvas3D-object, the value doesn't change when I resize the window, in contrast to getWidth(). Is this a bug or a feature?

Are there other possibilities to implement my intention?

Thanks in advance!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2012-08-30