[vtkusers] integrate a vtkOrientationMarkerWidget into a QVtkWidget

HamidG listboss at gmail.com
Mon Nov 28 17:49:47 EST 2011


Jean-Loïc wrote
> 
> // "Cast" QVTKWidget to  vtkRenderWindowInteractor
> vtkRenderWindow* renWin1 = QVTKWidget->GetRenderWindow();
> renWin1->AddRenderer( QVTKWidget->GetRenderer() );
> 
I am confused, QVTKWidget doesn't have GetRenderer()


Jean-Loïc wrote
> 
> vtkRenderWindowInteractor* iren1 = QVTKWidget->GetInteractor();
> // Call vtkRenderWindowInteractor in orientation marker widgt
> vtkOrientationMarkerWidget* widget = vtkOrientationMarkerWidget::New();
> widget->SetOutlineColor( 0.9300, 0.5700, 0.1300 );
> widget->SetOrientationMarker( this->m_Axes );
> widget->SetInteractor( renWin1->GetInteractor() );
> 
Did you also mean
widget->SetInteractor( iren1 );
Instead of widget->SetInteractor( renWin1->GetInteractor() ) ?

I am nitpicking because I've wasted 10 hours to get this thing work, a
simple integration of vtkOrientationMarkerWidget into QVTKWidget without
getting crashes or blank render windows :(

Any help is appreciated.

thanks in advance,

--
View this message in context: http://vtk.1045678.n5.nabble.com/integrate-a-vtkOrientationMarkerWidget-into-a-QVtkWidget-tp2843764p5030404.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list