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

Method SetTimeMode

Common/DataModel/vtkAnimationScene.cxx:75–94  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

73}
74//------------------------------------------------------------------------------
75void vtkAnimationScene::SetTimeMode(int mode)
76{
77 if (mode == vtkAnimationCue::TIMEMODE_NORMALIZED)
78 {
79 // If normalized time mode is being set on the scene,
80 // ensure that none of the contained cues need relative times.
81 vtkCollectionIterator* it = this->AnimationCuesIterator;
82 for (it->InitTraversal(); !it->IsDoneWithTraversal(); it->GoToNextItem())
83 {
84 vtkAnimationCue* cue = vtkAnimationCue::SafeDownCast(it->GetCurrentObject());
85 if (cue && cue->GetTimeMode() != vtkAnimationCue::TIMEMODE_NORMALIZED)
86 {
87 vtkErrorMacro("Scene contains a cue in relative mode. It must be removed "
88 "or changed to normalized mode before changing the scene time mode");
89 return;
90 }
91 }
92 }
93 this->Superclass::SetTimeMode(mode);
94}
95
96//------------------------------------------------------------------------------
97void vtkAnimationScene::InitializeChildren()

Callers

nothing calls this directly

Calls 4

GetCurrentObjectMethod · 0.80
InitTraversalMethod · 0.45
IsDoneWithTraversalMethod · 0.45
GoToNextItemMethod · 0.45

Tested by

no test coverage detected