[vtkusers] vtkPlaneWidget and clipping

Bertwim van Beest bwvb at xs4all.nl
Mon Sep 2 18:44:04 EDT 2002

Ik use an instance of vtkPlaneWidget to clip the display of a certain 
data set, like this: (float normal[3] is input parameter)
// ...
   _plane = vtkPlane::New();

   _planeWidget = vtkPlaneWidget::New();
   _planeWidget->SetInput( dataset );    // use dataset to get suitable 
dimensions of plane
   _planeWidget->SetInteractor( iren );  // attach an interactor
   _planeWidget->PlaceWidget();          // initial placement.
   _planeWidget->SetNormal( normal[0], normal[1], normal[2] ); // float 
normal[3] is input
   _planeWidget->GetPlane( _plane );      // return plane parameters
// ...
   _mapper = vtkDataSetMapper::New();
   _mapper->SetInput( dataset );
   _mapper->AddClippingPlane( _plane );
// ...  
   _actor = vtkActor::New();
   _actor->SetMapper( _mapper );

    This all works fine, and the display shows the expected clipping of 
the dataset. However, as it stands the normal vector (as displayed by an 
arrow when the  _planeWidget is in interactive mode, points to the 
*interior* of the clipped dataset. I would like to see this arrow  point 
to the *exterior* of the dataset, because it then is easier to select 
with the mouse.

How can I reverse the direction of the displayed arrow??  Probably very 
simple, but I can't find it in the documentation.

Thanks in advance,

More information about the vtkusers mailing list