vtkCompositeAnimationPlayer.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkCompositeAnimationPlayer_h
12 #define vtkCompositeAnimationPlayer_h
13 
14 #include "vtkAnimationPlayer.h"
15 #include "vtkRemotingAnimationModule.h" // needed for export macro
16 
19 
21 {
22 public:
25  void PrintSelf(ostream& os, vtkIndent indent) override;
26 
27  enum Modes
28  {
29  SEQUENCE = 0,
30  SNAP_TO_TIMESTEPS = 2
31  };
32 
34 
37  vtkSetMacro(PlayMode, int);
38  vtkGetMacro(PlayMode, int);
40 
44  void SetNumberOfFrames(int val);
45 
47 
50  void AddTimeStep(double val);
51  void RemoveAllTimeSteps();
52  void SetFramesPerTimestep(int val);
54 
56 
59  void SetStride(int _val) override;
61 
62 protected:
64  ~vtkCompositeAnimationPlayer() override;
65 
67 
70  void StartLoop(double starttime, double endtime, double curtime, double* playbackWindow) override;
71  void EndLoop() override;
72  double GetNextTime(double currentime) override;
73  double GetPreviousTime(double currenttime) override;
74  double GoToNext(double start, double end, double currenttime) override;
75  double GoToPrevious(double start, double end, double currenttime) override;
77 
78  vtkAnimationPlayer* GetActivePlayer();
79 
82 
83  int PlayMode;
84 
85 private:
87  void operator=(const vtkCompositeAnimationPlayer&) = delete;
88 
89  class vtkInternal;
90  vtkInternal* Internal;
91 };
92 
93 #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.
virtual void SetStride(int)
Get/Set the stride value fot the animation player.
vtkTimestepsAnimationPlayer * TimestepsAnimationPlayer
This is composite animation player that can me made to play an animation using the active player...
void GoToPrevious()
Take animation scene to previous frame.
friend class vtkCompositeAnimationPlayer
virtual void EndLoop()=0
Manage loop inside playbackwindow.
#define VTKREMOTINGANIMATION_EXPORT
void GoToNext()
Take the animation scene to next frame.
virtual double GetPreviousTime(double currenttime)=0
Manage loop inside playbackwindow.
vtkAnimationPlayer subclass that plays through a discrete set of time values.
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkObject * New()
vtkSequenceAnimationPlayer * SequenceAnimationPlayer