最近写VTK的响应程序发现鼠标响应函数最后都会有InvokeEvent函数,部分有FindPokedRenderer。对这两个函数的运行机制还不是很了解,现在具体介绍一下。
1、FindPokedRenderer
作为actor的管理工具,还可以设置背景,是vtkRenderWindowInteractor的方法,为了找到事件发生在哪一个renderer中,因为一个renderWindow中可能有多个renderer。FindPokedRendere就是用于获取renderWindow中当前的renderer。
2、InvokeEvent
此方法调用事件并返回事件是否中止。如果事件被中止,返回值为1,否则返回值为0。
参考自:https://blog.csdn.net/u010025211/article/details/25375279
https://www.xuebuyuan.com/803782.html