[vtkusers] VTK interactor has changed?
imho
imho at skynet.be
Wed Apr 16 06:21:22 EDT 2003
Hi all,
as I said I try to upgrade from 4.0 to 4.2, and additionnally to my heap
problem I have a class vtkInteractorStyleCustom : public
vtkInteractorStyle, and some things working before are no missing...
thanks for helping :/
the code :
------------------------------------------------------
void vtkInteractorStyleCustom::OnLeftButtonDown(int ctrl, int shift, int
x, int y)
{
this->FindPokedRenderer(x, y);
if (this->CurrentRenderer == NULL)
{
return;
}
int * xy= this->CurrentRenderer->GetRenderWindow()->GetSize();
width=xy[0]/2;
height=xy[1]/2;
if (reslice && (x<=width) && (y>=height))
{
double positionX = x;
double positionY = y - height ;
double spacing = hg->getSpacing();
double slice =
(double)((positionX-(width/2))/(double)((width/2)/spacing));
double slice2 =
(double)(((positionY)-(height/2))/(double)((height/2)/spacing));
bg->setSpacing(slice);
bd->setSpacing2(slice2);
}
else
{
this->UpdateInternalState(ctrl, shift, x, y);
this->FindPokedCamera(x, y);
if (this->HasObserver(vtkCommand::LeftButtonPressEvent))
{
this->InvokeEvent(vtkCommand::LeftButtonPressEvent,NULL);
}
else
{
if (this->ShiftKey)
{ //// I haven't got a Middle button !
if (this->CtrlKey)
{
this->StartDolly();
}
else
{
this->StartPan();
}
}
else
{
if (this->CtrlKey)
{
this->StartSpin();
}
else
{
this->StartRotate();
}
}
}
}
if (hg != NULL && hg->GetRenderer() == this->CurrentRenderer)
{
double positionX = x;
double positionY = y - height ;
hg->bougerViseur(positionX, positionY);
hg->selectionner(positionX, positionY);
if (hd)
{
hd->deselectionner();
hd->bougerViseur(positionX, positionY);
}
if (bg)
{
bg->deselectionner();
bg->bougerViseur(positionX, positionY);
}
if (bd)
{
bd->deselectionner();
bd->bougerViseur(positionX, positionY);
}
}
else if (hd != NULL && hd->GetRenderer() == this->CurrentRenderer)
{
double positionX = x - width;
double positionY = y - height ;
hd->bougerViseur(positionX, positionY);
hd->selectionner(positionX, positionY);
if (hg)
{
hg->deselectionner();
hg->bougerViseur(positionX, positionY);
}
if (bg)
{
bg->deselectionner();
bg->bougerViseur(positionX, positionY);
}
if (bd)
{
bd->deselectionner();
bd->bougerViseur(positionX, positionY);
}
}
else if (bg != NULL && bg->GetRenderer() == this->CurrentRenderer)
{
double positionX = x;
double positionY = y;
bg->bougerViseur(positionX, positionY);
bg->selectionner(positionX, positionY);
if (hd)
{
hd->deselectionner();
hd->bougerViseur(positionX, positionY);
}
if (hg)
{
hg->deselectionner();
hg->bougerViseur(positionX, positionY);
}
if (bd)
{
bd->deselectionner();
bd->bougerViseur(positionX, positionY);
}
}
else if (bd != NULL && bd->GetRenderer() == this->CurrentRenderer)
{
double positionX = x - width;
double positionY = y;
bd->bougerViseur(positionX, positionY);
bd->selectionner(positionX, positionY);
if (hd)
{
hd->deselectionner();
hd->bougerViseur(positionX, positionY);
}
if (bg)
{
bg->deselectionner();
bg->bougerViseur(positionX, positionY);
}
if (hg)
{
hg->deselectionner();
hg->bougerViseur(positionX, positionY);
}
}
this->CurrentRenderer->GetRenderWindow()->Render();
}
---------------------------------------------
the messages :
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.cpp(64) : error
C2039: 'UpdateInternalState' : is not a member of 'vtkInteractorStyleCustom'
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see
declaration of 'vtkInteractorStyleCustom'
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.cpp(66) : error
C2039: 'FindPokedCamera' : is not a member of 'vtkInteractorStyleCustom'
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see
declaration of 'vtkInteractorStyleCustom'
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.cpp(73) : error
C2039: 'ShiftKey' : is not a member of 'vtkInteractorStyleCustom'
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see
declaration of 'vtkInteractorStyleCustom'
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.cpp(75) : error
C2039: 'CtrlKey' : is not a member of 'vtkInteractorStyleCustom'
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see
declaration of 'vtkInteractorStyleCustom'
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.cpp(86) : error
C2039: 'CtrlKey' : is not a member of 'vtkInteractorStyleCustom'
c:\documents and settings\administrateur\mes
documents\memoire\newproject\vtkinteractorstylecustom.h(11) : see
declaration of 'vtkInteractorStyleCustom'
More information about the vtkusers
mailing list