[vtkusers] vtkArrowSource not working with vtkHandleWidget

ankushjain ankushjain79 at gmail.com
Mon Apr 16 07:43:11 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/vtkArrowSource-not-working-with-vtkHandleWidget-tp5643575p5643575.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list