------------------------------------------------------------------------------ Timer methods. There are two basic groups of methods, those for backward compatibility (group #1) and those that operate on specific timers (i.e., use timer ids). The first group of methods implicitly assume that there is only one timer at a time running. This was okay in the old days of VTK when only the interactors us
| 795 | // |
| 796 | // old-style group #1 |
| 797 | int vtkRenderWindowInteractor::CreateTimer(int timerType) |
| 798 | { |
| 799 | int platformTimerId, timerId; |
| 800 | if (timerType == VTKI_TIMER_FIRST) |
| 801 | { |
| 802 | unsigned long duration = this->TimerDuration; |
| 803 | timerId = vtkTimerId; // just use current id, assume we don't have multiple timers |
| 804 | platformTimerId = this->InternalCreateTimer(timerId, RepeatingTimer, duration); |
| 805 | if (0 == platformTimerId) |
| 806 | { |
| 807 | return 0; |
| 808 | } |
| 809 | (*this->TimerMap)[timerId] = vtkTimerStruct(platformTimerId, RepeatingTimer, duration); |
| 810 | return timerId; |
| 811 | } |
| 812 | |
| 813 | else // VTKI_TIMER_UPDATE is just updating last created timer |
| 814 | { |
| 815 | return 1; // do nothing because repeating timer has been created |
| 816 | } |
| 817 | } |
| 818 | |
| 819 | //------------------------------------------------------------------------------ |
| 820 | // old-style group #1 |
nothing calls this directly
no test coverage detected