vtkSequenceAnimationPlayer.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
9 #ifndef vtkSequenceAnimationPlayer_h
10 #define vtkSequenceAnimationPlayer_h
11 
12 #include "vtkAnimationPlayer.h"
13 #include "vtkRemotingAnimationModule.h" // needed for export macro
14 
16 {
17 public:
20  void PrintSelf(ostream& os, vtkIndent indent) override;
21 
22  vtkSetClampMacro(NumberOfFrames, int, 2, VTK_INT_MAX);
23  vtkGetMacro(NumberOfFrames, int);
24 
25 protected:
27  ~vtkSequenceAnimationPlayer() override;
28 
30 
33  // initialize inner variables. Call it before any GetNextTime/GetPreviousTime call.
34  void StartLoop(double start, double end, double, double* playbackwindow) override;
35  void EndLoop() override{};
36  // Get next time in loop. Overriden to update FrameNo, and use StartTime, EndTime.
37  double GetNextTime(double currentime) override;
38  // Get previous time in loop. Overriden to update FrameNo, and use StartTime, EndTime.
39  double GetPreviousTime(double currenttime) override;
41 
43 
49  double GoToNext(double start, double end, double currenttime) override;
50  double GoToPrevious(double start, double end, double currenttime) override;
52 
58  int GetTimestep(double start, double end, double current);
59 
64  double GetTimeFromTimestep(double start, double end, int timestep);
65 
68  double StartTime;
69  double EndTime;
70  int FrameNo;
71 
72 private:
74  void operator=(const vtkSequenceAnimationPlayer&) = delete;
75 };
76 
77 #endif
virtual double GetNextTime(double currentime)=0
Manage loop inside playbackwindow.
Abstract superclass for an animation player.
virtual void StartLoop(double starttime, double endtime, double curtime, double *playbackWindow)=0
Manage loop inside playbackwindow.
void EndLoop() override
Manage loop inside playbackwindow.
void GoToPrevious()
Take animation scene to previous frame.
#define VTKREMOTINGANIMATION_EXPORT
void GoToNext()
Take the animation scene to next frame.
virtual double GetPreviousTime(double currenttime)=0
Manage loop inside playbackwindow.
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkObject * New()