[vtkusers] renderwindowinteractor / renderwindow problem

Jan Stifter j.stifter at medres.ch
Tue Jan 9 12:18:12 EST 2001


i wrote 2 classes:

RenderWindow
RenderWindowInteractor,

these two classes are connecting vtk and qt (GUI toolkit) together.
everything worked fine so far, until i wanted to add a vtkCellPicker
to RenderWindowInteractor.

if i do in the constructor of RenderWindowInteractor:

   this->cellPicker = vtkCellPicker::New();
   CHECK_PTR( this->cellPicker );

   printf( "trying to set the tolerance\n" );
   this->cellpicker->SetTolerance(0.001);
   printf( "we crashed here\n" );

i get only the output "trying to set the tolerance" and then the code
crashes. this error is rather strange, because SetTolerance only sets
a float value (so the code in vtkCellPicker is correct).

if i add an actor to the Renderer and let the Renderer render the
scene, i can do 
this->cellPicker->SetTolerance(0.001);
without crashes anymore.


so my question to this rather strange error (which i can not debug):

what kind of initialization is happening in vtkRenderer and
vtkRenderWindow, when for the first time, a scene is rendered? what is
changing in the class vtkCellPicker?

any hints are _greatly_ appreciated

code of RenderWindow / RenderWindowInteractor can be found at
www.medres.ch/~jstifter/vtkandqt

jan


---
Jan Stifter
http://www.medres.ch/~jstifter/




More information about the vtkusers mailing list