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