------------------------------------------------------------------------------
| 210 | |
| 211 | //------------------------------------------------------------------------------ |
| 212 | void vtkAnimationScene::TickInternal(double currenttime, double deltatime, double clocktime) |
| 213 | { |
| 214 | this->AnimationTime = currenttime; |
| 215 | this->ClockTime = clocktime; |
| 216 | |
| 217 | vtkCollectionIterator* iter = this->AnimationCuesIterator; |
| 218 | for (iter->InitTraversal(); !iter->IsDoneWithTraversal(); iter->GoToNextItem()) |
| 219 | { |
| 220 | vtkAnimationCue* cue = vtkAnimationCue::SafeDownCast(iter->GetCurrentObject()); |
| 221 | if (cue) |
| 222 | { |
| 223 | const PlayDirection dir = cue->GetDirection(); // back up cue's direction. |
| 224 | cue->SetDirection(this->Direction); |
| 225 | switch (cue->GetTimeMode()) |
| 226 | { |
| 227 | case vtkAnimationCue::TIMEMODE_RELATIVE: |
| 228 | cue->Tick(currenttime - this->StartTime, deltatime, clocktime); |
| 229 | break; |
| 230 | |
| 231 | case vtkAnimationCue::TIMEMODE_NORMALIZED: |
| 232 | cue->Tick((currenttime - this->StartTime) / (this->EndTime - this->StartTime), |
| 233 | deltatime / (this->EndTime - this->StartTime), clocktime); |
| 234 | break; |
| 235 | |
| 236 | default: |
| 237 | vtkErrorMacro("Invalid cue time mode"); |
| 238 | } |
| 239 | cue->SetDirection(dir); // restore old direction. |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | this->Superclass::TickInternal(currenttime, deltatime, clocktime); |
| 244 | } |
| 245 | |
| 246 | //------------------------------------------------------------------------------ |
| 247 | void vtkAnimationScene::StartCueInternal() |
nothing calls this directly
no test coverage detected