[vtkusers] Picking Actors in vtk 4.0/4.2

Bill Vogler vogler at calcreek.com
Mon Mar 21 16:51:33 EST 2005


Hello -

I am porting our application from vtk 4.0 to vtk 4.2 and am having problems
with some classes that were valid in 4.0 and are now obsolete in 4.2. The
class that is obsolete is vtkInteractorStyleTrackball.

My present problem is with ::OnLeftButtonDown(). I need to modify the
following code so it is compatible with 4.2. In our application, the user
selects an actor by clicking it with "Ctrl Left Button". If the "ctrl"
button was not used then vtkInteractorStyleTrackball::OnLeftButtonDown() is
called:

void FaceInteractorStyle::OnLeftButtonDown(int ctrl, int shift, int X,
intY){
     if( ctrl ) {

          // If the ctrl left button is pressed, get the actor.

          this->InteractionPicker->Pick( X, Y, 0.0, m_renderer );
          vtkActor *actor = this->InteractionPicker->GetActor();
          if( actor == NULL )
           return;

          m_modelView->ActorSelected( actor );
     }
     else {
      vtkInteractorStyleTrackball::OnLeftButtonDown( ctrl,  shift,  X,  Y);
     }
} // end of OnLeftButtonDown

It appears that major modifications were made in 4.2 and among other things
OnLeftButtonDown() does not take any arguments.

Normally I wouldn't be bothering you folks on this list, but I can't find
any references or documentation on the migration path to 4.2. Can anyone
point me to any documentation, or provide some hints on how I can modify
this code segment to bring it up to V4.2?

TIA

Bill Vogler
Calabazas Creek Research
(530) 642-1955 Voice
(530) 642-9614 Fax
vogler at calcreek.com





More information about the vtkusers mailing list