00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "wxVTKRenderWindowInteractor.h"
00021
00022
00023 #ifndef VTK_MAJOR_VERSION
00024 # include "vtkVersion.h"
00025 #endif
00026
00027 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00028 # include "vtkCommand.h"
00029 #else
00030 # include "vtkInteractorStyle.h"
00031 #endif
00032
00033
00034 #if (!wxCHECK_VERSION(2, 4, 0))
00035 wxWindow* wxGetTopLevelParent(wxWindow *win)
00036 {
00037 while ( win && !win->IsTopLevel() )
00038 win = win->GetParent();
00039 return win;
00040 }
00041 #endif
00042
00043
00044 #ifdef __WXCOCOA__
00045 #ifdef VTK_USE_COCOA
00046 #import <Cocoa/Cocoa.h>
00047
00048 #define id Id
00049 #else
00050 #error Build mismatch you need both wxWidgets and VTK to be configure agains Cocoa to work
00051 #endif //VTK_USE_COCOA
00052 #endif //__WXCOCOA__
00053
00054 #ifdef __WXGTK__
00055 # include "gdk/gdkprivate.h"
00056 # include "gdk/gdkx.h"
00057 # include <wx/gtk/win_gtk.h>
00058 #define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \
00059 GDK_WINDOW_XWINDOW(GTK_PIZZA((wxwin)->m_wxwindow)->bin_window) : \
00060 GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)
00061 #endif
00062
00063 #ifdef __WXX11__
00064 #include "wx/x11/privx.h"
00065 #define GetXWindow(wxwin) ((Window)(wxwin)->GetHandle())
00066 #endif
00067
00068
00069
00070
00071
00072 #if wxCHECK_VERSION(2, 3, 2) && !wxCHECK_VERSION(2, 4, 1) && defined(__WXGTK__)
00073 # define WX_USE_X_CAPTURE 0
00074 #else
00075 # define WX_USE_X_CAPTURE 1
00076 #endif
00077
00078 #define ID_wxVTKRenderWindowInteractor_TIMER 1001
00079
00080 #ifdef __WXGTK__
00081 IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxGLCanvas)
00082 #else
00083 IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxWindow)
00084 #endif //__WXGTK__
00085
00086
00087 #ifdef __WXGTK__
00088 BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxGLCanvas)
00089 #else
00090 BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxWindow)
00091 #endif //__WXGTK__
00092
00093 EVT_PAINT (wxVTKRenderWindowInteractor::OnPaint)
00094 EVT_ERASE_BACKGROUND(wxVTKRenderWindowInteractor::OnEraseBackground)
00095 EVT_MOTION (wxVTKRenderWindowInteractor::OnMotion)
00096
00097
00098 EVT_LEFT_DOWN (wxVTKRenderWindowInteractor::OnButtonDown)
00099 EVT_MIDDLE_DOWN (wxVTKRenderWindowInteractor::OnButtonDown)
00100 EVT_RIGHT_DOWN (wxVTKRenderWindowInteractor::OnButtonDown)
00101 EVT_LEFT_UP (wxVTKRenderWindowInteractor::OnButtonUp)
00102 EVT_MIDDLE_UP (wxVTKRenderWindowInteractor::OnButtonUp)
00103 EVT_RIGHT_UP (wxVTKRenderWindowInteractor::OnButtonUp)
00104 #if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
00105 EVT_ENTER_WINDOW(wxVTKRenderWindowInteractor::OnEnter)
00106 EVT_LEAVE_WINDOW(wxVTKRenderWindowInteractor::OnLeave)
00107
00108
00109
00110 EVT_KEY_DOWN (wxVTKRenderWindowInteractor::OnKeyDown)
00111 EVT_CHAR (wxVTKRenderWindowInteractor::OnChar)
00112 EVT_KEY_UP (wxVTKRenderWindowInteractor::OnKeyUp)
00113 #endif
00114 EVT_TIMER (ID_wxVTKRenderWindowInteractor_TIMER, wxVTKRenderWindowInteractor::OnTimer)
00115 EVT_SIZE (wxVTKRenderWindowInteractor::OnSize)
00116 END_EVENT_TABLE()
00117
00118
00119 #ifdef __WXGTK__
00120 wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : vtkRenderWindowInteractor(), wxGLCanvas(NULL, wxID_ANY, wxDefaultPosition)
00121 #else
00122 wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor() : vtkRenderWindowInteractor(), wxWindow()
00123 #endif
00124 , timer(this, ID_wxVTKRenderWindowInteractor_TIMER)
00125 , ActiveButton(wxEVT_NULL)
00126 , RenderAllowed(0)
00127 , Stereo(0)
00128 , Handle(0)
00129 , Created(true)
00130 , RenderWhenDisabled(1)
00131 , UseCaptureMouse(0)
00132 {
00133 this->RenderWindow = NULL;
00134 this->SetRenderWindow(vtkRenderWindow::New());
00135 this->RenderWindow->Delete();
00136
00137 m_keyDown1 = 0;
00138 m_keyDown2 = 0;
00139 m_oldKeyDown = 0;
00140 }
00141
00142 wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor(wxWindow *parent,
00143 wxWindowID id,
00144 const wxPoint &pos,
00145 const wxSize &size,
00146 long style,
00147 const wxString &name)
00148 #ifdef __WXGTK__
00149 : vtkRenderWindowInteractor(), wxGLCanvas(parent, id, pos, size, style, name)
00150 #else
00151 : vtkRenderWindowInteractor(), wxWindow(parent, id, pos, size, style, name)
00152 #endif //__WXGTK__
00153 , timer(this, ID_wxVTKRenderWindowInteractor_TIMER)
00154 , ActiveButton(wxEVT_NULL)
00155 , RenderAllowed(0)
00156 , Stereo(0)
00157 , Handle(0)
00158 , Created(true)
00159 , RenderWhenDisabled(1)
00160 , UseCaptureMouse(0)
00161 {
00162 this->RenderWindow = NULL;
00163 this->SetRenderWindow(vtkRenderWindow::New());
00164 this->RenderWindow->Delete();
00165
00166 m_keyDown1 = 0;
00167 m_keyDown2 = 0;
00168 m_oldKeyDown = 0;
00169 }
00170
00171 wxVTKRenderWindowInteractor::~wxVTKRenderWindowInteractor()
00172 {
00173 }
00174
00175 wxVTKRenderWindowInteractor * wxVTKRenderWindowInteractor::New()
00176 {
00177
00178 return new wxVTKRenderWindowInteractor;
00179 }
00180
00181 void wxVTKRenderWindowInteractor::Initialize()
00182 {
00183 int *size = RenderWindow->GetSize();
00184
00185 Enable();
00186
00187
00188
00189 Size[0] = size[0];
00190 Size[1] = size[1];
00191
00192
00193 Initialized = 1;
00194 }
00195
00196 void wxVTKRenderWindowInteractor::Enable()
00197 {
00198
00199 if (Enabled)
00200 return;
00201
00202
00203 Enabled = 1;
00204 #ifdef __WXGTK__
00205 this->SetCurrent();
00206 #endif
00207 Modified();
00208 }
00209
00210 bool wxVTKRenderWindowInteractor::Enable(bool enable)
00211 {
00212 #ifdef __WXGTK__
00213 return wxGLCanvas::Enable(enable);
00214 #else
00215 return wxWindow::Enable(enable);
00216 #endif
00217 }
00218
00219 void wxVTKRenderWindowInteractor::Disable()
00220 {
00221
00222 if (!Enabled)
00223 return;
00224
00225
00226 Enabled = 0;
00227 Modified();
00228 }
00229
00230 void wxVTKRenderWindowInteractor::Start()
00231 {
00232
00233 vtkErrorMacro(<<"wxVTKRenderWindowInteractor::Start() \
00234 interactor cannot control event loop.");
00235 }
00236
00237 void wxVTKRenderWindowInteractor::UpdateSize(int x, int y)
00238 {
00239 if( RenderWindow )
00240 {
00241
00242 if ( x != Size[0] || y != Size[1] )
00243 {
00244
00245 Size[0] = x;
00246 Size[1] = y;
00247
00248 RenderWindow->SetSize(x, y);
00249 }
00250 }
00251 }
00252
00253 int wxVTKRenderWindowInteractor::CreateTimer(int WXUNUSED(timertype))
00254 {
00255
00256 if (!timer.Start(10, TRUE))
00257 assert(false);
00258
00259 return 1;
00260
00261 }
00262
00263 int wxVTKRenderWindowInteractor::DestroyTimer()
00264 {
00265
00266 return 1;
00267 }
00268
00269 void wxVTKRenderWindowInteractor::OnTimer(wxTimerEvent& WXUNUSED(event))
00270 {
00271 if (!Enabled)
00272 return;
00273
00274 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00275
00276 InvokeEvent(vtkCommand::TimerEvent, NULL);
00277 #else
00278
00279 InteractorStyle->OnTimer();
00280 #endif
00281 }
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291 long wxVTKRenderWindowInteractor::GetHandleHack()
00292 {
00293
00294 long handle_tmp = 0;
00295
00296
00297
00298
00299 #if defined(__WXMSW__) || defined(__WXMAC__)
00300 handle_tmp = (long)this->GetHandle();
00301 #endif //__WXMSW__
00302
00303
00304 #ifdef __WXCOCOA__
00305
00306 wxTopLevelWindow* toplevel = dynamic_cast<wxTopLevelWindow*>(
00307 wxGetTopLevelParent( this ) );
00308 if (toplevel != NULL )
00309 {
00310 handle_tmp = (long)toplevel->GetNSWindow();
00311 }
00312
00313
00314
00315 #endif //__WXCOCOA__
00316
00317
00318 #if defined(__WXGTK__) || defined(__WXX11)
00319 return (long)GetXWindow(this);
00320 #endif
00321
00322
00323
00324
00325
00326 return handle_tmp;
00327 }
00328
00329 void wxVTKRenderWindowInteractor::OnPaint(wxPaintEvent& WXUNUSED(event))
00330 {
00331
00332 wxPaintDC pDC(this);
00333
00334
00335 if(!Handle)
00336 {
00337 Handle = GetHandleHack();
00338 RenderWindow->SetWindowId(reinterpret_cast<void *>(Handle));
00339 #ifdef __WXMSW__
00340 RenderWindow->SetParentId(reinterpret_cast<void *>(this->GetParent()->GetHWND()));
00341 #endif //__WXMSW__
00342 }
00343
00344 Render();
00345 }
00346
00347 void wxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)
00348 {
00349
00350 event.Skip(false);
00351 }
00352
00353 void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent& WXUNUSED(event))
00354 {
00355 int w, h;
00356 GetClientSize(&w, &h);
00357 UpdateSize(w, h);
00358
00359 if (!Enabled)
00360 {
00361 return;
00362 }
00363
00364 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00365 InvokeEvent(vtkCommand::ConfigureEvent, NULL);
00366 #endif
00367
00368
00369 }
00370
00371 void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
00372 {
00373 if (!Enabled)
00374 {
00375 return;
00376 }
00377 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00378 SetEventInformationFlipY(event.GetX(), event.GetY(),
00379 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
00380
00381 InvokeEvent(vtkCommand::MouseMoveEvent, NULL);
00382 #else
00383 InteractorStyle->OnMouseMove(event.ControlDown(), event.ShiftDown(),
00384 event.GetX(), Size[1] - event.GetY() - 1);
00385 #endif
00386 }
00387
00388 #if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
00389 void wxVTKRenderWindowInteractor::OnEnter(wxMouseEvent &event)
00390 {
00391 if (!Enabled)
00392 {
00393 return;
00394 }
00395
00396 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00397
00398 SetEventInformationFlipY(event.GetX(), event.GetY(),
00399 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
00400
00401 InvokeEvent(vtkCommand::EnterEvent, NULL);
00402 #else
00403
00404 InteractorStyle->OnEnter(event.ControlDown(), event.ShiftDown(),
00405 event.GetX(), Size[1] - event.GetY() - 1);
00406 #endif
00407 }
00408
00409 void wxVTKRenderWindowInteractor::OnLeave(wxMouseEvent &event)
00410 {
00411 if (!Enabled)
00412 {
00413 return;
00414 }
00415
00416 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00417
00418 SetEventInformationFlipY(event.GetX(), event.GetY(),
00419 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
00420
00421 InvokeEvent(vtkCommand::LeaveEvent, NULL);
00422 #else
00423
00424 InteractorStyle->OnLeave(event.ControlDown(), event.ShiftDown(),
00425 event.GetX(), Size[1] - event.GetY() - 1);
00426 #endif
00427 }
00428
00429 void wxVTKRenderWindowInteractor::OnKeyDown(wxKeyEvent &event)
00430 {
00431 if (!Enabled)
00432 {
00433 return;
00434 }
00435
00436 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00437
00438 int keycode = event.GetKeyCode();
00439 char key = '\0';
00440 if (keycode < 256)
00441 {
00442
00443 key = (char)keycode;
00444
00445 if ((!event.ShiftDown ()) && (keycode >= 65) && (keycode <= 90)) {
00446
00447 key += 32;
00448 }
00449 }
00450
00451
00452 if (m_oldKeyDown != key) {
00453
00454 m_oldKeyDown = key;
00455
00456 SetEventInformationFlipY(event.GetX(), event.GetY(),
00457 event.ControlDown(), event.ShiftDown(), key, 0, NULL);
00458
00459 InvokeEvent(vtkCommand::KeyPressEvent, NULL);
00460
00461
00462 if (this->IsInKeyDownRange (key)) {
00463 InvokeEvent(vtkCommand::CharEvent, NULL);
00464 }
00465 }
00466 #else
00467 InteractorStyle->OnKeyDown(event.ControlDown(), event.ShiftDown(),
00468 event.GetKeyCode(), 1);
00469 #endif
00470
00471
00472 if (!this->IsInKeyDownRange (key)) {
00473 event.Skip();
00474 }
00475 }
00476
00477 void wxVTKRenderWindowInteractor::OnChar(wxKeyEvent &event)
00478 {
00479 if (!Enabled)
00480 {
00481 return;
00482 }
00483
00484 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00485
00486 int keycode = event.GetKeyCode();
00487 char key = '\0';
00488 if (keycode < 256)
00489 {
00490
00491 key = (char)keycode;
00492 }
00493
00494 SetEventInformationFlipY(event.GetX(), event.GetY(),
00495 event.ControlDown(), event.ShiftDown(), key, 0, NULL);
00496
00497
00498
00499 InvokeEvent(vtkCommand::CharEvent, NULL);
00500 #else
00501 InteractorStyle->OnKeyDown(event.ControlDown(), event.ShiftDown(),
00502 event.GetKeyCode(), 1);
00503 #endif
00504 event.Skip();
00505 }
00506
00507 void wxVTKRenderWindowInteractor::OnKeyUp(wxKeyEvent &event)
00508 {
00509 if (!Enabled)
00510 {
00511 return;
00512 }
00513
00514 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00515
00516 int keycode = event.GetKeyCode();
00517 char key = '\0';
00518 if (keycode < 256)
00519 {
00520
00521 key = (char)keycode;
00522
00523 if ((!event.ShiftDown ()) && (keycode >= 65) && (keycode <= 90)) {
00524
00525 key += 32;
00526 }
00527 }
00528
00529 m_oldKeyDown = 0;
00530
00531 SetEventInformationFlipY(event.GetX(), event.GetY(),
00532 event.ControlDown(), event.ShiftDown(), key, 0, NULL);
00533 InvokeEvent(vtkCommand::KeyReleaseEvent, NULL);
00534 #else
00535 InteractorStyle->OnKeyUp(event.ControlDown(), event.ShiftDown(),
00536 event.GetKeyCode(), 1);
00537 #endif
00538 event.Skip();
00539 }
00540 #endif
00541 //---------------------------------------------------------------------------
00542 void wxVTKRenderWindowInteractor::OnButtonDown(wxMouseEvent &event)
00543 {
00544 if (!Enabled || (ActiveButton != wxEVT_NULL))
00545 {
00546 return;
00547 }
00548 ActiveButton = event.GetEventType();
00549
00550 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00551 SetEventInformationFlipY(event.GetX(), event.GetY(),
00552 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
00553 #endif
00554
00555 if(event.RightDown())
00556 {
00557 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00558
00559 InvokeEvent(vtkCommand::RightButtonPressEvent, NULL);
00560 #else
00561
00562 InteractorStyle->OnRightButtonDown(event.ControlDown(), event.ShiftDown(),
00563 event.GetX(), Size[1] - event.GetY() - 1);
00564 #endif
00565 }
00566 else if(event.LeftDown())
00567 {
00568 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00569
00570 InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);
00571 #else
00572
00573 InteractorStyle->OnLeftButtonDown(event.ControlDown(), event.ShiftDown(),
00574 event.GetX(), Size[1] - event.GetY() - 1);
00575 #endif
00576 }
00577 else if(event.MiddleDown())
00578 {
00579 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00580
00581 InvokeEvent(vtkCommand::MiddleButtonPressEvent, NULL);
00582 #else
00583
00584 InteractorStyle->OnMiddleButtonDown(event.ControlDown(), event.ShiftDown(),
00585 event.GetX(), Size[1] - event.GetY() - 1);
00586 #endif
00587 }
00588
00589
00590
00591
00592 if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse)
00593 {
00594 CaptureMouse();
00595 }
00596 }
00597
00598 void wxVTKRenderWindowInteractor::OnButtonUp(wxMouseEvent &event)
00599 {
00600
00601
00602
00603
00604 if (!Enabled || (ActiveButton != (event.GetEventType()-1)))
00605 {
00606 return;
00607 }
00608
00609 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00610 SetEventInformationFlipY(event.GetX(), event.GetY(),
00611 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
00612 #endif
00613
00614 if(ActiveButton == wxEVT_RIGHT_DOWN)
00615 {
00616 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00617
00618 InvokeEvent(vtkCommand::RightButtonReleaseEvent, NULL);
00619 #else
00620
00621 InteractorStyle->OnRightButtonUp(event.ControlDown(), event.ShiftDown(),
00622 event.GetX(), Size[1] - event.GetY() - 1);
00623 #endif
00624 }
00625 else if(ActiveButton == wxEVT_LEFT_DOWN)
00626 {
00627 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00628
00629 InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL);
00630 #else
00631
00632 InteractorStyle->OnLeftButtonUp(event.ControlDown(), event.ShiftDown(),
00633 event.GetX(), Size[1] - event.GetY() - 1);
00634 #endif
00635 }
00636 else if(ActiveButton == wxEVT_MIDDLE_DOWN)
00637 {
00638 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
00639
00640 InvokeEvent(vtkCommand::MiddleButtonReleaseEvent, NULL);
00641 #else
00642
00643 InteractorStyle->OnMiddleButtonUp(event.ControlDown(), event.ShiftDown(),
00644 event.GetX(), Size[1] - event.GetY() - 1);
00645 #endif
00646 }
00647
00648 if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse)
00649 {
00650 ReleaseMouse();
00651 }
00652 ActiveButton = wxEVT_NULL;
00653 }
00654
00655 void wxVTKRenderWindowInteractor::Render()
00656 {
00657 RenderAllowed = 1;
00658 if (!RenderWhenDisabled)
00659 {
00660
00661
00662 wxWindow *topParent = wxGetTopLevelParent(this);
00663 if (topParent)
00664 {
00665
00666
00667 RenderAllowed = topParent->IsEnabled();
00668 }
00669 }
00670
00671 if (RenderAllowed)
00672 {
00673 if(Handle && (Handle == GetHandleHack()) )
00674 {
00675 RenderWindow->Render();
00676 }
00677 #if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
00678 else if(GetHandleHack())
00679 {
00680
00681
00682
00683 Handle = GetHandleHack();
00684 RenderWindow->SetNextWindowId(reinterpret_cast<void *>(Handle));
00685 RenderWindow->WindowRemap();
00686 RenderWindow->Render();
00687 }
00688 #endif
00689 }
00690 }
00691
00692 void wxVTKRenderWindowInteractor::SetRenderWhenDisabled(int newValue)
00693 {
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710 RenderWhenDisabled = (newValue != 0) ? true : false;
00711 }
00712
00713
00714
00715
00716
00717 void wxVTKRenderWindowInteractor::SetStereo(int capable)
00718 {
00719 if (Stereo != capable)
00720 {
00721 Stereo = capable;
00722 RenderWindow->StereoCapableWindowOn();
00723 RenderWindow->SetStereoTypeToCrystalEyes();
00724 Modified();
00725 }
00726 }
00727
00728
00729 void wxVTKRenderWindowInteractor::SetKeyDownKeyRange (char key1, char key2)
00730 {
00731 m_keyDown1 = key1;
00732 m_keyDown2 = key2;
00733 }
00734
00735
00736 bool wxVTKRenderWindowInteractor::IsInKeyDownRange (char key) const
00737 {
00738 return ((key >= m_keyDown1) && (key <= m_keyDown2));
00739 }
00740
00741
00742
00743
00744
00745 void wxVTKRenderWindowInteractor::PrintSelf(ostream& os, vtkIndent indent)
00746 {
00747 this->Superclass::PrintSelf(os, indent);
00748 }