[vtk-developers] Issue with using vtkArrowSource in vtkHandleWidget

ankushjain ankushjain79 at gmail.com
Tue Apr 17 12:27:26 EDT 2012


I am trying to display arrow (using vtkArrowSource) on the vtkHandleWidget as
follow:

   vtkArrowSource *arrSrc = vtkArrowSource::New();
   vtkPolygonalHandleRepresentation3D *axes =
vtkPolygonalHandleRepresentation3D::New();
   axes->SetHandle(arrSrc->GetOutput());
   vtkSmartPointer<vtkHandleWidget> widget =
vtkSmartPointer<vtkHandleWidget>::New();
   widget->SetRepresentation(axes);
   widget->SetInteractor( renderWindowInteractor );
   widget->SetEnabled( 1 );

but nothing comes on screen.

Instead if I use vtkOrientationMarkerWidget in place of vtkHandleWidget I
can see the arrow:
   vtkArrowSource *arrSrc = vtkArrowSource::New();
   vtkPolygonalHandleRepresentation3D *axes =
vtkPolygonalHandleRepresentation3D::New();
   axes->SetHandle(arrSrc->GetOutput());
   vtkSmartPointer<vtkOrientationMarkerWidget> widget =
vtkSmartPointer<vtkOrientationMarkerWidget>::New();
   widget->SetOrientationMarker( axes );
   widget->SetInteractor( renderWindowInteractor );
   widget->SetEnabled( 1 );

What could be the reason of vtkArrowSource not working with vtkHandleWidget.

--
View this message in context: http://vtk.1045678.n5.nabble.com/Issue-with-using-vtkArrowSource-in-vtkHandleWidget-tp5646970p5646970.html
Sent from the VTK - Dev mailing list archive at Nabble.com.



More information about the vtk-developers mailing list