0

ZoomExtents not working as expected?

Frank 8 years ago 0

I'm using a HelixViewport3D to display a collection of Point3D objects derived from raw magnetometer readings. Magnetometer X,Y,Z reading can vary from very small values (<< 1) to well over 5000.


When my program starts, I load a small collection of points whose radius is <= 1, as shown in Figure 1

Image 24


After loading my actual magnetometer data, all points are very far off-screen (Figure2), but zooming out with the mouse wheel allows me to see them all, and rotate/pan/zoom as desired (Figure3):

Image 25


Image 26


I decided to try calling ZoomExtents() after loading all the magnetometer points, in order to avoid having the user panic when no points were visible immediately after loading, but this resulted in points being clipped regardless of the zoom level produced by zooming in or out with the mouse wheel (See Figure4 below). I also tried using the 'S' command to move the camera position out, but the camera position moves so slowly using this method that it was unusable for my purposes.


Image 27


At the moment, I'm not quite sure how to proceed. Any idea what I'm doing wrong with the ZoomExtents() command?


TIA,


Frank