[vtk-developers] Compute view bounds

David Doria daviddoria at gmail.com
Wed Oct 12 13:58:59 EDT 2011


On Wed, Oct 12, 2011 at 1:53 PM, jojo1309 <johann.mazzella at gmail.com> wrote:
> Hi,
>
> I'm new to VTK, so maybe my problem is very simple.
>
> I can dispay a planesource, I can zoom in and out with the wheel mouse, and
> I can pan it.
>
> My problem know is that I would like to avoid pan or zoom if it goes outside
> the planesource. I'd like the view to stay inside the planesource. (the view
> stays orthogonal to the plane)
>
> I was looking for a way to get the viewbounds and to block the pan or the
> zoom if it goes outside, but maybe there's a better way.
>
> Thanks a lot for your help, and sorry for my poor english....

This question is better posed to the vtk-users mailing list. I think
the general approach would be to subclass the
vtkInteractoStyleTrackballCamera and build the logic into the
OnMouseMove() function.

David



More information about the vtk-developers mailing list