------------------------------------------------------------------------------ Translate from platformTimerId to the corresponding (VTK) timerId. Returns 0 (invalid VTK timerId) if platformTimerId is not found in the map. This first stab at an implementation just iterates the map until it finds the sought platformTimerId. If performance becomes an issue (lots of timers, all firing frequently...) w
| 944 | // all firing frequently...) we could speed this up by making a reverse map so |
| 945 | // this method is a quick map lookup. |
| 946 | int vtkRenderWindowInteractor::GetVTKTimerId(int platformTimerId) |
| 947 | { |
| 948 | int timerId = 0; |
| 949 | vtkTimerIdMapIterator iter = this->TimerMap->begin(); |
| 950 | for (; iter != this->TimerMap->end(); ++iter) |
| 951 | { |
| 952 | if ((*iter).second.Id == platformTimerId) |
| 953 | { |
| 954 | timerId = (*iter).first; |
| 955 | break; |
| 956 | } |
| 957 | } |
| 958 | |
| 959 | return timerId; |
| 960 | } |
| 961 | |
| 962 | //------------------------------------------------------------------------------ |
| 963 | // Access to the static variable |
no test coverage detected