VTKFIG  0.20.20181114
Easy VTK based in situ visualization
void vtkfig::internals::MainThread::PrepareRenderThread ( MainThread mainthread)
staticprivate

Prepare render thread before start.

Definition at line 902 of file vtkfigMainThread-2018-01-26-2205.cxx.

903  {
905  auto frame=mainthread->framemap[0];
906 
907  mainthread->interactor = vtkSmartPointer<vtkRenderWindowInteractor>::New();
908  auto style = vtkSmartPointer<MyInteractorStyle>::New();
909  style->SetFrame(frame);
910  mainthread->interactor->SetInteractorStyle(style);
911 
912  mainthread->interactor->SetRenderWindow(frame->window);
913 
914  auto callback = vtkSmartPointer<MyTimerCallback>::New();
915  callback->Interactor=mainthread->interactor;
916  callback->mainthread=mainthread;
917  mainthread->interactor->AddObserver(vtkCommand::TimerEvent,callback);
918 
919  mainthread->interactor->Initialize();
920 
921  mainthread->interactor->CreateRepeatingTimer(mainthread->timer_interval);
922  }
double timer_interval
Timer interval for timer callback.
static MainThread * mainthread
"This" thread
vtkSmartPointer< vtkRenderWindowInteractor > interactor
std::map< int, Frame * > framemap
Map of all frames handeled by thread.
static void RTAddFrame(MainThread *mt, int iframe)
Add frame, to be called from render thread.

+ Here is the call graph for this function: