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 vtkInteractorStyleBaseView::OnLeftButtonDown();
110 if (GetInteractor()->GetControlKey()==1 ){
111 this->vtkInteractorStyleTrackballCamera::OnMiddleButtonDown();
113 this->vtkInteractorStyleTrackballCamera::OnLeftButtonDown();
118 this->FindPokedRenderer(this->Interactor->GetEventPosition()[0],
119 this->Interactor->GetEventPosition()[1]);
120 if (this->CurrentRenderer == NULL)
125 if (this->Interactor->GetControlKey()) {
132 if (this->Interactor->GetShiftKey())
134 if (this->Interactor->GetControlKey())
145 if (this->Interactor->GetControlKey())
158 //---------------------------------------------------------------------------
159 void vtkInteractorStyleBaseView3D::OnLeftButtonUp ()
161 vtkInteractorStyleBaseView::OnLeftButtonUp();
164 if (GetInteractor()->GetControlKey()==1 ){
165 this->vtkInteractorStyleTrackballCamera::OnMiddleButtonUp();
167 this->vtkInteractorStyleTrackballCamera::OnLeftButtonUp();
182 //---------------------------------------------------------------------------
183 void vtkInteractorStyleBaseView3D::OnMiddleButtonDown ()
185 vtkInteractorStyleBaseView::OnMiddleButtonDown();
186 // this->vtkInteractorStyleTrackballCamera::OnMiddleButtonDown();
188 //---------------------------------------------------------------------------
189 void vtkInteractorStyleBaseView3D::OnMiddleButtonUp ()
191 vtkInteractorStyleBaseView::OnMiddleButtonUp();
193 // this->vtkInteractorStyleTrackballCamera::OnMiddleButtonUp();