MCPcopy Create free account
hub / github.com/Kitware/VTK / GetVTKTimerId

Method GetVTKTimerId

Rendering/Core/vtkRenderWindowInteractor.cxx:946–960  ·  view source on GitHub ↗

------------------------------------------------------------------------------ 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

Source from the content-addressed store, hash-verified

944// all firing frequently...) we could speed this up by making a reverse map so
945// this method is a quick map lookup.
946int 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

Callers 2

InternalDestroyTimerMethod · 0.80
FireTimersMethod · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected