[vtkusers] help for newbie
D.OSullivan at pilz.ie
D.OSullivan at pilz.ie
Fri May 2 05:23:02 EDT 2003
i have just completed my first vtk based app but i have two issues i need
some help with.
1) how do i prevent the user dragging the 3d image out of the 3d viewer
2) how do i prevent the vtk toolkit window poping up in the background
My app is written in java and am i using the vtkcanvas as my render window.
The app is running on windows NT.
Everything works fine except for the following two items.
1) i need to restrict the users use of the mouse.
What i have done is allow the user to select one of four modes of
navigation - rotate, spin, zoom or pan. The first three are ok, but i have
a problem with the pan operation.
Essentially the user can drag the mouse through the vtkcanvas and in this
way pan the scene. However if he pans too far there will be nothing left to
look at. I need to prevent this happening.
So far all i can do is stop the user dragging the mouse outside the
vtkcanvas. This is ok if he started dragging by click on some object in the
scene. But if, say, he starts dragging from the top of the canvas where
there are no objects he can easily "push" all objects out of view.
I would like to prevent further panning when a particular object is about
to loose visiblity. Does anyone know how to achieve this? I have tried
checking the visibility of various actors in the scene, but they all say
they are visible (even when i cannot see them).
2) When i call vtkCanvas.getIren().Initialize() (i.e.
vtkGenericRenderWindowInteractor.Initialize()) a window pops up in the
background.
The title is "vtk toolkit..." . If i close this window (via the taskbar) it
kills my app. I need to prevent this happening. Does anyone know how to
prevent this window appearing?
More information about the vtkusers
mailing list