2 #include "vtkInteractorStyleBaseView3D.h"
4 #include "vtkObjectFactory.h"
6 vtkStandardNewMacro(vtkInteractorStyleBaseView3D);
8 //---------------------------------------------------------------------------
9 vtkInteractorStyleBaseView3D::vtkInteractorStyleBaseView3D(){
11 //---------------------------------------------------------------------------
12 vtkInteractorStyleBaseView3D::~vtkInteractorStyleBaseView3D(){
14 //---------------------------------------------------------------------------
15 void vtkInteractorStyleBaseView3D::OnRightButtonDown ()
17 vtkInteractorStyleBaseView::OnRightButtonDown();
20 if (GetInteractor()->GetControlKey()==1 ){
21 this->vtkInteractorStyleTrackballCamera::OnRightButtonDown();
24 this->FindPokedRenderer(this->Interactor->GetEventPosition()[0],
25 this->Interactor->GetEventPosition()[1]);
27 if (this->CurrentRenderer == NULL)
32 if (this->Interactor->GetControlKey()) {
37 //---------------------------------------------------------------------------
38 void vtkInteractorStyleBaseView3D::OnRightButtonUp ()
40 vtkInteractorStyleBaseView::OnRightButtonUp();
43 if (GetInteractor()->GetControlKey()==1 ){
44 this->vtkInteractorStyleTrackballCamera::OnRightButtonUp();
56 //---------------------------------------------------------------------------
57 void vtkInteractorStyleBaseView3D::OnMouseMove ()
59 vtkInteractorStyleBaseView::OnMouseMove();
61 // this->vtkInteractorStyleTrackballCamera::OnMouseMove();
63 // int x = this->Interactor->GetEventPosition()[0]; // JPRx
64 // int y = this->Interactor->GetEventPosition()[1]; // JPRx
67 // vtkRenderWindowInteractor *rwi = this->Interactor;
69 // int lx = rwi->GetLastEventPosition()[0]; // JPRx
70 // int ly = rwi->GetLastEventPosition()[1]; // JPRx
71 // int dx = rwi->GetEventPosition()[0] ; // JPRx
72 // int dy = rwi->GetEventPosition()[1] ; // JPRx
78 // this->FindPokedRenderer(x, y);
80 // this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
84 // this->FindPokedRenderer(x, y);
86 // this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
90 // this->FindPokedRenderer(x, y);
92 // this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
96 // this->FindPokedRenderer(x, y);
98 // this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
105 //---------------------------------------------------------------------------
106 void vtkInteractorStyleBaseView3D::OnLeftButtonDown()
108 // printf("EED creaMaracasVisu::vtkInteractorStyleBaseView3D::OnLeftButtonDown \n");
109 vtkInteractorStyleBaseView::OnLeftButtonDown();
111 if (GetInteractor()->GetControlKey()==1 ){
112 this->vtkInteractorStyleTrackballCamera::OnMiddleButtonDown();
114 this->vtkInteractorStyleTrackballCamera::OnLeftButtonDown();
119 this->FindPokedRenderer(this->Interactor->GetEventPosition()[0],
120 this->Interactor->GetEventPosition()[1]);
121 if (this->CurrentRenderer == NULL)
126 if (this->Interactor->GetControlKey()) {
133 if (this->Interactor->GetShiftKey())
135 if (this->Interactor->GetControlKey())
146 if (this->Interactor->GetControlKey())
159 //---------------------------------------------------------------------------
160 void vtkInteractorStyleBaseView3D::OnLeftButtonUp ()
162 vtkInteractorStyleBaseView::OnLeftButtonUp();
165 if (GetInteractor()->GetControlKey()==1 ){
166 this->vtkInteractorStyleTrackballCamera::OnMiddleButtonUp();
168 this->vtkInteractorStyleTrackballCamera::OnLeftButtonUp();
183 //---------------------------------------------------------------------------
184 void vtkInteractorStyleBaseView3D::OnMiddleButtonDown ()
186 vtkInteractorStyleBaseView::OnMiddleButtonDown();
187 // this->vtkInteractorStyleTrackballCamera::OnMiddleButtonDown();
189 //---------------------------------------------------------------------------
190 void vtkInteractorStyleBaseView3D::OnMiddleButtonUp ()
192 vtkInteractorStyleBaseView::OnMiddleButtonUp();
194 // this->vtkInteractorStyleTrackballCamera::OnMiddleButtonUp();