/usr/include/vtk-6.3/vtkAnimationCue.h is in libvtk6-dev 6.3.0+dfsg1-5.
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 196 197 198 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkAnimationCue.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm 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 vtkAnimationCue - a seqin an animation.
// .SECTION Description
// vtkAnimationCue and vtkAnimationScene provide the framework to support
// animations in VTK. vtkAnimationCue represents an entity that changes/
// animates with time, while vtkAnimationScene represents scene or setup
// for the animation, which consists on individual cues or other scenes.
//
// A cue has three states: UNINITIALIZED, ACTIVE and INACTIVE.
// UNINITIALIZED represents an point in time before the start time of the cue.
// The cue is in ACTIVE state at a point in time between start time and end time
// for the cue. While, beyond the end time, it is in INACTIVE state.
// When the cue enters the ACTIVE state, StartAnimationCueEvent is fired. This
// event may be handled to initialize the entity to be animated.
// When the cue leaves the ACTIVE state, EndAnimationCueEvent is fired, which
// can be handled to cleanup after having run the animation.
// For every request to render during the ACTIVE state, AnimationCueTickEvent is
// fired, which must be handled to perform the actual animation.
// .SECTION See Also
// vtkAnimationScene
#ifndef vtkAnimationCue_h
#define vtkAnimationCue_h
#include "vtkCommonCoreModule.h" // For export macro
#include "vtkObject.h"
class VTKCOMMONCORE_EXPORT vtkAnimationCue: public vtkObject
{
public:
vtkTypeMacro(vtkAnimationCue,vtkObject);
void PrintSelf(ostream& os, vtkIndent indent);
static vtkAnimationCue* New();
//BTX
// Structure passed on every event invocation.
// Depending upon the cue time mode, these times are either
// normalized [0,1] or relative to the scene that contains the cue.
// All this information is also available by asking the cue
// directly for it within the handler. Thus, this information can
// be accessed in wrapped languages.
class AnimationCueInfo
{
public:
double StartTime;
double EndTime;
double AnimationTime;// valid only in AnimationCueTickEvent handler
double DeltaTime; // valid only in AnimationCueTickEvent handler
double ClockTime; // valid only in AnimationCueTickEvent handler
};
//ETX
// Description:
// Get/Set the time mode. In Normalized mode, the start and end
// times of the cue are normalized [0,1] with respect to the start and
// end times of the container scene. In Relative mode the start and end
// time of the cue are specified in offset seconds relative to the
// start time of the container scene.
virtual void SetTimeMode(int mode);
vtkGetMacro(TimeMode, int);
void SetTimeModeToRelative()
{ this->SetTimeMode(TIMEMODE_RELATIVE); }
void SetTimeModeToNormalized()
{ this->SetTimeMode(TIMEMODE_NORMALIZED); }
// Description:
// Get/Set the Start time for this cue.
// When the current time is >= StartTime, the Cue is in
// ACTIVE state. if Current time i < StartTime, the Cue is in
// UNINITIALIZED state. Whenever the cue enters the ACTIVE state from
// an INACTIVE state, it triggers the StartEvent.
// The Start time is in seconds relative to the start of the
// container Scene (when in Relative time mode) or is normalized
// over the span of the container Scene (when in Normalized time mode).
vtkSetMacro(StartTime, double);
vtkGetMacro(StartTime, double);
// Description:
// Get/Set the End time for this cue.
// When the current time is > EndTime, the Cue is in
// INACTIVE state. Whenever the cue leaves an ACTIVE state to enter
// INACTIVE state, the EndEvent is triggered.
// The End time is in seconds relative to the start of the
// container Scene (when in Relative time mode) or is normalized
// over the span of the container Scene (when in Normalized time mode).
vtkSetMacro(EndTime, double);
vtkGetMacro(EndTime, double);
// Description:
// Indicates a tick or point in time in the animation.
// Triggers a Tick event if currenttime >= StartTime and
// currenttime <= EndTime.
// Whenever the state of the cue changes,
// either StartEvent or EndEvent is triggerred depending upon
// whether the cue entered Active state or quit active state respectively.
// The current time is relative to the start of the container Scene
// (when in Relative time mode) or is normalized
// over the span of the container Scene (when in Normalized time mode).
// deltatime is the time since last call to Tick. deltatime also can be in seconds
// relative to the start of the container Scene or normalized depending upon the
// cue's Time mode.
// clocktime is the time from the scene i.e. it does not depend on the time
// mode for the cue.
// For the first call to Tick
// after a call to Initialize(), the deltatime is 0;
virtual void Tick(double currenttime, double deltatime, double clocktime);
// Description:
// Called when the playing of the scene begins.
// This will set the Cue to UNINITIALIZED state.
virtual void Initialize();
// Description:
// Called when the scene reaches the end.
// If the cue state is ACTIVE when this method is called, this will
// trigger a EndAnimationCueEvent.
virtual void Finalize();
// Description:
// This is valid only in a AnimationCueTickEvent handler.
// Before firing the event the animation cue sets the AnimationTime to
// the time of the tick.
vtkGetMacro(AnimationTime, double);
// Description:
// This is valid only in a AnimationCueTickEvent handler.
// Before firing the event the animation cue sets the DeltaTime
// to the difference in time between the current tick and the last tick.
vtkGetMacro(DeltaTime, double);
// Description:
// This is valid only in a AnimationCueTickEvent handler.
// Before firing the event the animation cue sets the ClockTime to
// the time of the tick. ClockTime is directly the time from the animation
// scene neither normalized nor offsetted to the start of the scene.
vtkGetMacro(ClockTime, double);
//BTX
enum TimeCodes
{
TIMEMODE_NORMALIZED=0,
TIMEMODE_RELATIVE=1
};
//ETX
protected:
vtkAnimationCue();
~vtkAnimationCue();
//BTX
enum {
UNINITIALIZED=0,
INACTIVE,
ACTIVE
};
//ETX
double StartTime;
double EndTime;
int TimeMode;
// These are set when the AnimationCueTickEvent event
// is fired. Thus giving access to the information in
// the AnimationCueInfo struct in wrapped languages.
double AnimationTime;
double DeltaTime;
double ClockTime;
// Description:
// Current state of the Cue.
int CueState;
// Description:
// These are the internal methods that actually trigger they
// corresponding events. Subclasses can override these to
// do extra processing at start/end or on tick.
virtual void StartCueInternal();
virtual void TickInternal(double currenttime, double deltatime,
double clocktime);
virtual void EndCueInternal();
private:
vtkAnimationCue(const vtkAnimationCue&); // Not implemented.
void operator=(const vtkAnimationCue&); // Not implemented.
};
#endif
|