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

Method StartAnimation

Charts/Core/vtkScatterPlotMatrix.cxx:630–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630void vtkScatterPlotMatrix::StartAnimation(vtkRenderWindowInteractor* interactor)
631{
632 // Start a simple repeating timer to advance along the path until completion.
633 if (!this->Private->TimerCallbackInitialized && interactor)
634 {
635 this->Animating = true;
636 if (!this->Private->AnimationCallbackInitialized)
637 {
638 this->Private->AnimationCallback->SetClientData(this);
639 this->Private->AnimationCallback->SetCallback(vtkScatterPlotMatrix::ProcessEvents);
640 interactor->AddObserver(vtkCommand::TimerEvent, this->Private->AnimationCallback, 0);
641 this->Private->Interactor = interactor;
642 this->Private->AnimationCallbackInitialized = true;
643 }
644 this->Private->TimerCallbackInitialized = true;
645 // This defines the interval at which the animation will proceed. 25Hz?
646 this->Private->TimerId = interactor->CreateRepeatingTimer(1000 / 50);
647 this->Private->AnimationIter = this->Private->AnimationPath.begin();
648 this->Private->AnimationPhase = PIMPL::AnimationPhaseEnum::Ready;
649 }
650}
651
652void vtkScatterPlotMatrix::AdvanceAnimation()
653{

Callers 2

BeginAnimationPathMethod · 0.95

Calls 4

SetClientDataMethod · 0.80
CreateRepeatingTimerMethod · 0.80
AddObserverMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected