[vtkusers] bug in vtkInteractorStyleFlight ?

Jean-Dominique Barnichon jeando.barnichon at free.fr
Mon Jun 2 15:07:18 EDT 2003


John,

I am almost pleased of your answer, though it does not solve my problem.
Just to know, have you any idea on the approximate date at which this bug
could be fixed/how much work it would require?

By the way, as suggested by Shaded, I try creating and attaching new
interactor first and then deleting the old one afterwards (which sounds
better I agree). Unfortunately, it does not change anything (not surprising
after your answer).

Jean-Do


-----Message d'origine-----
De : John Biddiscombe [mailto:jbiddiscombe at skippingmouse.co.uk]
Envoyé : samedi 31 mai 2003 09:47
À : Jean-Dominique Barnichon; vtkusers at public.kitware.com
Objet : Re: [vtkusers] bug in vtkInteractorStyleFlight ?


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