/usr/include/paraview/vtkSMAnimationScene.h is in paraview-dev 5.0.1+dfsg1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | /*=========================================================================
Program: ParaView
Module: $RCSfile$
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkSMAnimationScene - animation scene for ParaView.
// .SECTION Description
// vtkSMAnimationScene extends vtkAnimationCue to add support for a scene in
// ParaView.
//
// We don't use vtkAnimationScene since ParaView has more elaborate playback
// requirements. To support that, this class delegates playback
// responsibility to vtkAnimationPlayer and subclasses.
//
// vtkSMAnimationScene also is proxy-aware and hence can work with proxies
// and views proxies for updating property values, rendering, etc.
//
// vtkSMAnimationScene forwards the vtkCommand::StartEvent and
// vtkCommand::EndEvent from vtkCompositeAnimationPlayer to mark the start and
// end of animation playback.
#ifndef vtkSMAnimationScene_h
#define vtkSMAnimationScene_h
#include "vtkPVAnimationModule.h" //needed for exports
#include "vtkAnimationCue.h"
#include "vtkCommand.h" // needed for vtkCommand::UserEvent
class vtkCompositeAnimationPlayer;
class vtkEventForwarderCommand;
class vtkSMProxy;
class vtkSMViewProxy;
class VTKPVANIMATION_EXPORT vtkSMAnimationScene : public vtkAnimationCue
{
public:
static vtkSMAnimationScene* New();
vtkTypeMacro(vtkSMAnimationScene, vtkAnimationCue);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Add/Remove an AnimationCue to/from the Scene.
// It's an error to add a cue twice to the Scene.
void AddCue(vtkAnimationCue* cue);
void RemoveCue(vtkAnimationCue* cue);
void RemoveAllCues();
int GetNumberOfCues();
// Description:
// Add view proxies that are involved in the animation generated by this
// scene. When playing the animation, the scene will call StillRender() on
// the view proxies it is aware of, also updating any caching parameters.
void AddViewProxy(vtkSMViewProxy* proxy);
void RemoveViewProxy(vtkSMViewProxy* proxy);
void RemoveAllViewProxies();
// Description;
// Access the view proxies.
unsigned int GetNumberOfViewProxies();
vtkSMViewProxy* GetViewProxy(unsigned int cc);
// Description:
// Set the time keeper. Time keeper is used to obtain the information about
// timesteps. This is required to play animation in "Snap To Timesteps" mode.
void SetTimeKeeper(vtkSMProxy*);
vtkGetObjectMacro(TimeKeeper, vtkSMProxy);
// Description:
// Lock the start time. When locked, the StartTime won't be automatically
// updated when data time changes.
vtkSetMacro(LockStartTime, bool);
vtkGetMacro(LockStartTime, bool);
vtkBooleanMacro(LockStartTime, bool);
// Description:
// Lock the end time. When locked, the EndTime won't be automatically updated
// when the data time changes.
vtkSetMacro(LockEndTime, bool);
vtkGetMacro(LockEndTime, bool);
vtkBooleanMacro(LockEndTime, bool);
// Description:
// Sets the current animation time.
void SetSceneTime(double time)
{
if (this->InTick)
{
// Since this method can be called during a Tick() event handler.
return;
}
this->Initialize();
this->Tick(time, 0, time);
}
// Get the time of the most recent tick.
// The only difference between this and AnimationTime (or ClockTime) defined
// in the superclass is that, unlike the latter this is defined even outside
// AnimationCueTickEvent handlers.
vtkGetMacro(SceneTime, double);
// Description:
// Get/Set the Playback Window for this cue.
// The Playback Window is use to mask out time that belong to a given cue
// but that we don't want to play back.
// This is particulary useful when we want to export a subset of an animation
// without recomputing any start and end value relative to the cue and the
// number of frame associated to it.
// This is used by the Animation Player to only play a subset of the cue.
// To disable it just make the lower bound bigger than the upper one.
vtkSetVector2Macro(PlaybackTimeWindow, double);
vtkGetVector2Macro(PlaybackTimeWindow, double);
// Description:
// Forwarded to vtkCompositeAnimationPlayer.
void SetLoop(int val);
int GetLoop();
void Play();
void Stop();
void GoToNext();
void GoToPrevious();
void GoToFirst();
void GoToLast();
void SetPlayMode(int val);
int GetPlayMode();
void SetNumberOfFrames(int val);
void SetDuration(int val);
void SetFramesPerTimestep(int val);
enum
{
// Fired whenever the vtkAnimationScene wants to request the
// vtkSMAnimationSceneProxy to update the start/end times.
// The calldata is a vtkVector2d with the suggested time-range.
UpdateStartEndTimesEvent = vtkCommand::UserEvent
};
// Description:
// Set to true to force caching to be disabled. When false (default), caching
// is determined based on the value from
// vtkPVGeneralSettings::GetInstance()->GetCacheGeometryForAnimation().
vtkSetMacro(ForceDisableCaching, bool);
vtkGetMacro(ForceDisableCaching, bool);
//BTX
protected:
vtkSMAnimationScene();
~vtkSMAnimationScene();
// Description:
// Overridden to ensure that caching parameters are passed to the view
// correctly.
virtual void StartCueInternal();
virtual void TickInternal(
double currenttime, double deltatime, double clocktime);
virtual void EndCueInternal();
// Description:
// Called when the timekeeper's time range changes.
void TimeKeeperTimeRangeChanged();
void TimeKeeperTimestepsChanged();
bool LockStartTime;
bool LockEndTime;
bool InTick;
double SceneTime;
double PlaybackTimeWindow[2];
bool ForceDisableCaching;
vtkSMProxy* TimeKeeper;
vtkCompositeAnimationPlayer* AnimationPlayer;
vtkEventForwarderCommand* Forwarder;
friend class vtkSMAnimationSceneImageWriter;
bool OverrideStillRender;
vtkSetMacro(OverrideStillRender, bool);
private:
vtkSMAnimationScene(const vtkSMAnimationScene&); // Not implemented
void operator=(const vtkSMAnimationScene&); // Not implemented
class vtkInternals;
vtkInternals* Internals;
unsigned long TimeRangeObserverID;
unsigned long TimestepValuesObserverID;
//ETX
};
#endif
|