VTKFIG  0.20.20181114
Easy VTK based in situ visualization
void vtkfig::internals::MainThread::AddFrame ( Frame frame)
private

Add frame to be handeled by thread.

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

162  {
163  frame->mainthread=this;
164  frame->number_in_frame_list=lastframenum;
165  this->iframe=lastframenum;
166  framemap[lastframenum++]=frame;
167  if (lastframenum==1)
168  {
170  {
171  Start();
172  }
173  else
174  {
175  if (connection_open)
176  {
179  }
180  else
181  {
182  PrepareRenderThread(this);
183  }
184  }
185  }
186  else
187  {
188  SendCommand(frame->number_in_frame_list, "AddFrame", Communicator::Command::MainThreadAddFrame);
189  }
190  }
int lastframenum
Number of last frame created.
void Start()
Spawn parallel thread for rendering or communication.
static void PrepareCommunicatorThread(MainThread *)
Prepare comm thread before start.
bool connection_open
State of connection to client.
static void PrepareRenderThread(MainThread *)
Prepare render thread before start.
bool try_running_multithreaded
Toggle multithreaded/single (at startup)
void SendCommand(int iframe, const std::string from, Communicator::Command cmd)
Communication with render thread.
std::map< int, Frame * > framemap
Map of all frames handeled by thread.
int iframe
Frame number as parameter during communication.
static void CommunicatorThreadCallback(MainThread *)
Callback function for communicator thread if multithreading is off.

+ Here is the call graph for this function: