[vtkusers] Odd QVTKWidget behaviour

Gib Bogle g.bogle at auckland.ac.nz
Mon Nov 16 16:17:27 EST 2015


I use QVTKWidget in several programs, and all works well.  Now one program is exhibiting a different behaviour.  In this program the repeated calls to iren->render() do not cause anything to appear on the display until there is an interactor mouse move event (I hold down a mouse button and move the mouse incrementally).  After that the display is updated as usual, without any further mouse interaction.

The only difference that I can see in the code is that in the misbehaving program I am setting the camera position and focal point the first time the scene is rendered:

ren->GetActiveCamera()->SetPosition(0, 0, 0);
ren->GetActiveCamera()->SetFocalPoint(x0, x0, x0);

whereas in the program that always displays the scene I simply do

ren->ResetCamera();

Presumably another command needs to be executed after changing the camera's position and focal point.  ResetCamera restores the defaults, which is not what I want.

Any suggestions?

Thanks
Gib



More information about the vtkusers mailing list