How to fix 3D data viewing angle setting

Hello,

If I understand well, you want to know which parameter you should save/load to keep the same zoom.

I see you’re saving/loading the “ParallelScale” parameter. If your camera is using the “ParallelProjection”, then you should already be able to achieve what you want. Otherwise, when you’re not using parallel projection, the information you’re looking for is the “ViewAngle”.

You can augment your function with vtkCamera::SetViewAngle(double) and vtkCamera::GetViewAngle(). By the way, you’re talking about functions from vtkRenderer which actually are in vtkCamera. Maybe in your VTK version those were exposed, I didn’t find this information. I guess if it was the case that the view angle should also have been exposed.

Correct me if I’m wrong!
Best regards