[vtkusers] Major bug in vtkInteractorStyleJoystickCamera::OnLeftButtonUp()

burkhardt.dorn at berlin.de burkhardt.dorn at berlin.de
Fri Nov 23 11:09:16 EST 2001


Hi all,
it seems to me, that in 

/*=========================================================================

  Program:   Visualization Toolkit
  Module:    $RCSfile: vtkInteractorStyleJoystickCamera.cxx,v $
  Language:  C++
  Date:      $Date: 2000/12/10 20:08:40 $
  Version:   $Revision: 1.9 $

=========================================================================*/
void vtkInteractorStyleJoystickCamera::OnLeftButtonUp(int vtkNotUsed(ctrl),
						      int vtkNotUsed(shift),
						      int vtkNotUsed(x),
						      int vtkNotUsed(y))
is a major bug because for some states the current status
is not correctly finished. For example, the status
VTK_INTERACTOR_STYLE_CAMERA_PAN has no EndPan() which for
RayCasting() leaves the Timer() working
and avoids the final accurate update of the 3-D-view.

My personal solution was current code:

void vtkInteractorStyleJoystickCamera::OnLeftButtonUp(int vtkNotUsed(ctrl),
						      int vtkNotUsed(shift),
						      int vtkNotUsed(x),
						      int vtkNotUsed(y))
{
  if (this->State == VTK_INTERACTOR_STYLE_CAMERA_ROTATE)
    {
    this->EndRotate();
    }
  else if (this->State == VTK_INTERACTOR_STYLE_CAMERA_PAN)
    {
    this->EndPan(); // Missing
    }
  else if (this->State == VTK_INTERACTOR_STYLE_CAMERA_SPIN)
    {
    this->EndSpin();
    }
  else if(this->State==VTK_INTERACTOR_STYLE_CAMERA_ZOOM)
    {
    this->EndDolly();  // Missing
    }

  this->State = VTK_INTERACTOR_STYLE_CAMERA_NONE;
}


Sorry if this is already a known bug or if my solution is 
wrong. In any case the current method is not correct.

Regards
Burkhardt Dorn
mailto:burkhardt.dorn at berlin.de
--
berlin.de - meine stadt im netz. Jetzt eigene eMail-adresse @berlin.de sichern!
http://www.berlin.de/home/MeineStadt/Anmeldung




More information about the vtkusers mailing list