[vtkusers] interactor problem with 4.2

laurent Mundeleer lmundele at ulb.ac.be
Fri Oct 24 06:08:47 EDT 2003


Hi all,
I try to upgrade from 4.0 to 4.2, but I see that some functions have 
changed.
I have an interactor who herits from the vtkInteractorStyleTrackballCamera.
The problem is that the function I want to override OnLeftButtonDown(int 
ctrl, int shift, int x, int y) has changed to OnLeftButtonDown().

So I've taked the original function that I've agremented with some calls 
but I've got errors with lines like these who use the 'Interactor' 
member : 
int x = this->Interactor->GetEventPosition()[0];
int y = this->Interactor->GetEventPosition()[1];
" invalid use of undefined type `struct vtkRenderWindowInteractor' "
what should I do?

here's all the function's code :

-----------------------------
void interactorStyle2Vues3D::OnLeftButtonDown()
{
  int x = this->Interactor->GetEventPosition()[0];
  int y = this->Interactor->GetEventPosition()[1];
  this->FindPokedRenderer(x,y);
  if (this->CurrentRenderer == NULL)
    {
    return;
    }
   
  //------------

  if (aff1->GetRenderer() == this->CurrentRenderer)
  {
    aff2->deselectionner();
    aff1->selectionner(x, y);
    this->CurrentRenderer->GetRenderWindow()->Render();
  }
  else if (aff2->GetRenderer() == this->CurrentRenderer)
  {
    aff1->deselectionner();
    aff2->selectionner(x, y);
    this->CurrentRenderer->GetRenderWindow()->Render();
  }

  //------------

 
  if (this->Interactor->GetShiftKey())
    {
    if (this->Interactor->GetControlKey())
      {
      this->StartDolly();
      }
    else
      {
      this->StartPan();
      }
    }
  else
    {
    if (this->Interactor->GetControlKey())
      {
      this->StartSpin();
      }
    else
      {
      this->StartRotate();
      }
    }
}
-------------------------------

thanks for any help,

Laurent

-- 
********************************************
Laurent Mundeleer
Université Libre de Bruxelles (ULB)
Service des Systèmes Logiques et Numériques (SLN) CP165/57
50, Av. F.Roosevelt
1050 Bruxelles
Belgium
tel : ++32.2.650.22.97
fax : ++32.2.650.22.98
e-mail : lmundele at ulb.ac.be
********************************************





More information about the vtkusers mailing list