[vtkusers] bug in vtkInteractorStyleFlight ?
John Biddiscombe
jbiddiscombe at skippingmouse.co.uk
Sat May 31 03:47:11 EDT 2003
Flight mode isn't working right now. I need to find time to fix it,
JB
----- Original Message -----
From: "Jean-Dominique Barnichon" <jeando.barnichon at free.fr>
To: <vtkusers at public.kitware.com>
Sent: Friday, May 30, 2003 10:52 PM
Subject: [vtkusers] bug in vtkInteractorStyleFlight ?
> Hi,
>
> I am developing a soft with VC++ 6.0 and vtk4.0, in which I want the user
to
> be able to choose between several interaction modes (joystick, trackball,
> flight).
>
> Everything works fine in most cases, i.e. the user is able to change the
> interaction mode. However, from time to time, the program crashes on such
a
> change without any explicit message.
> The "strange" thing is that when a crash occurs, it is always on the
> selection of the flight mode, never for the other modes. As the code
> responsible (see herebelow) of changing the interaction mode looks pretty
> much the same in the 3 cases, I am wondering if this could be a
problem/bug
> in vtkInteractorStyleFlight.
>
> Does anybody has already experienced such a problem, or has any idea of
> where it could come from?
>
> Thanks,
> Jean-Do
>
> When the user changes the interaction mode, the current mode is deleted, a
> new one is created and assigned to the interactor.
>
> // Joystick interaction mode
> void CMyView::OnJoystick()
> { if (this->Interactor) {
> this->Interactor->GetInteractorStyle()->Delete(); }
> vtkInteractorStyleTrackball* JoystickStyle =
> vtkInteractorStyleTrackball::New();
> JoystickStyle->SetTrackballModeToJoystick();
> this->Interactor->SetInteractorStyle(JoystickStyle);
> }
>
> // Flight interaction mode
> void CMyView::OnPilot()
> { if (this->Interactor) {
> this->Interactor->GetInteractorStyle()->Delete(); }
> vtkInteractorStyleFlight* FlightStyle = vtkInteractorStyleFlight::New();
> double data[3]={0,0,1};
> FlightStyle->SetFixedUpVector(data);
> FlightStyle->FixUpVectorOn();
> this->Interactor->SetInteractorStyle(FlightStyle);
> }
>
> // Trackball interaction mode
> void CMyView::OnTrackball()
> { if (this->Interactor) {
> this->Interactor->GetInteractorStyle()->Delete(); }
> vtkInteractorStyleTrackball* TrackballStyle =
> vtkInteractorStyleTrackball::New();
> TrackballStyle->SetTrackballModeToTrackball();
> this->Interactor->SetInteractorStyle(TrackballStyle);
> }
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list