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

Method TickInternal

Common/DataModel/vtkAnimationScene.cxx:212–244  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

210
211//------------------------------------------------------------------------------
212void 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//------------------------------------------------------------------------------
247void vtkAnimationScene::StartCueInternal()

Callers

nothing calls this directly

Calls 7

GetCurrentObjectMethod · 0.80
InitTraversalMethod · 0.45
IsDoneWithTraversalMethod · 0.45
GoToNextItemMethod · 0.45
GetDirectionMethod · 0.45
SetDirectionMethod · 0.45
TickMethod · 0.45

Tested by

no test coverage detected