vtkRenderWindowInteractor event loop and threading

坚强是说给别人听的谎言 提交于 2019-12-01 20:11:56
Blito

I've been able to do rotations after calling start(), but in my case from the same thread.

The trick is to use a vtkCommand and set a timer in the vtkRenderWindowInteractor to call that command. That command is basically a callback that will be able to modify your actors.

You can see a working example of this in this thread.

Regarding the multi-threading approach you're using, maybe you could keep the rendering thread waiting in vtkCommand::Execute until the modifying thread is done. If you're able to use C++11 you could use a lot of the new tools available in the STL.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!