[vtkusers] vtkInteractorStyle- again

verena kinder verena.kinder at web.de
Wed Apr 13 13:47:25 EDT 2005


Hello!

I derive a class vtkMyInteractorStyle from the class vtkInteractorStyleSwitch. I only overwrite the function OnChar():

void vtkMyInteractorStyle1::OnChar()
{
  switch (this->Interactor->GetKeyCode())
    {
    case 'j':
    case 'J':

      this->JoystickOrTrackball = VTKIS_JOYSTICK;
      this->EventCallbackCommand->SetAbortFlag(1);
      break;
    case 't':
    case 'T':
      this->JoystickOrTrackball = VTKIS_TRACKBALL;
      this->EventCallbackCommand->SetAbortFlag(1);
      break;
    case 'c':
    case 'C':
      this->CameraOrActor = VTKIS_CAMERA;
      this->EventCallbackCommand->SetAbortFlag(1);
      break;
    case 'a':
    case 'A':
      this->CameraOrActor = VTKIS_ACTOR;
      this->EventCallbackCommand->SetAbortFlag(1);
      break;
    case 'k':
    case 'K':
      this->JoystickOrTrackball = VTKIS_TRACKBALL;
      this->EventCallbackCommand->SetAbortFlag(1);
      break;
    }
  // Set the CurrentStyle pointer to the picked style
  this->SetCurrentStyle();
}
In the main I call the function iren->SetInteractorStyle(vtkMyInteractorStyle::New());

But my program don't reacts on my working. Even when I delete the case j and case t the program switch between this two modi.
Why?
Thanks
verena 
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193




More information about the vtkusers mailing list