Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkPVKeyFrameCueManipulator Class Reference

animation manipulator that uses keyframes to generate the animation. More...

#include <vtkPVKeyFrameCueManipulator.h>

Inheritance diagram for vtkPVKeyFrameCueManipulator:
Inheritance graph
[legend]
Collaboration diagram for vtkPVKeyFrameCueManipulator:
Collaboration graph
[legend]

Public Types

typedef vtkPVCueManipulator Superclass
 
- Public Types inherited from vtkPVCueManipulator
enum  { StateModifiedEvent = 2000 }
 StateModifiedEvent - This event is fired when the manipulator modifies the animated proxy. More...
 
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
int AddKeyFrame (vtkPVKeyFrame *keyframe)
 Add a key frame. More...
 
void RemoveKeyFrame (vtkPVKeyFrame *keyframe)
 Removes a key frame at the specified time, if any. More...
 
void RemoveAllKeyFrames ()
 Removes all key frames, if any. More...
 
vtkPVKeyFrameGetKeyFrame (double time)
 Returns a pointer to the key frame at the given time. More...
 
unsigned int GetNumberOfKeyFrames ()
 Get the number of keyframes. More...
 
vtkPVKeyFrameGetKeyFrameAtIndex (int index)
 Access the keyframe collection using the indices. More...
 
virtual int GetLastAddedKeyFrameIndex ()
 This method returns the index of the last added key frame. More...
 
vtkPVKeyFrameGetStartKeyFrame (double time)
 Given the current time, determine the key frames between which the current time lies. More...
 
vtkPVKeyFrameGetEndKeyFrame (double time)
 Given the current time, determine the key frames between which the current time lies. More...
 
vtkPVKeyFrameGetNextKeyFrame (vtkPVKeyFrame *keyFrame)
 Get the next/previous key frame relative to argument key frame. More...
 
vtkPVKeyFrameGetPreviousKeyFrame (vtkPVKeyFrame *keyFrame)
 Get the next/previous key frame relative to argument key frame. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPVKeyFrameCueManipulatorSafeDownCast (vtkObject *o)
 
static vtkPVKeyFrameCueManipulatorNew ()
 
- Static Public Member Functions inherited from vtkPVCueManipulator
static int IsTypeOf (const char *type)
 
static vtkPVCueManipulatorSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

void Initialize (vtkPVAnimationCue *) override
 This method is called when the AnimationCue's StartAnimationCueEvent is triggered, to let the animation manipulator know that the cue has been restarted. More...
 
void Finalize (vtkPVAnimationCue *) override
 This method is called when the AnimationCue's EndAnimationCueEvent is triggered. More...
 
void UpdateValue (double currenttime, vtkPVAnimationCue *cueproxy) override
 This updates the values based on currenttime. More...
 
int AddKeyFrameInternal (vtkPVKeyFrame *keyframe)
 
int RemoveKeyFrameInternal (vtkPVKeyFrame *keyframe)
 
void ExecuteEvent (vtkObject *obj, unsigned long event, void *)
 
 vtkPVKeyFrameCueManipulator ()
 This method iterates over all added keyframe proxies and updates the domains for all keyframes, such that for every keyframe J, with keytime between keyframes I and K, the domain for keytime of J is (DomainJ)min = KeyTimeI and (DomainJ)max = KeyTimeK. More...
 
 ~vtkPVKeyFrameCueManipulator () override
 This method iterates over all added keyframe proxies and updates the domains for all keyframes, such that for every keyframe J, with keytime between keyframes I and K, the domain for keytime of J is (DomainJ)min = KeyTimeI and (DomainJ)max = KeyTimeK. More...
 
- Protected Member Functions inherited from vtkPVCueManipulator
 vtkPVCueManipulator ()
 
 ~vtkPVCueManipulator () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkPVKeyFrameCueManipulatorInternals * Internals
 
vtkPVKeyFrameCueManipulatorObserverObserver
 
int SendEndEvent
 
int LastAddedKeyFrameIndex
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class vtkPVKeyFrameCueManipulatorObserver
 

Detailed Description

animation manipulator that uses keyframes to generate the animation.

This is a Manipulator that support key framing. Key frames are stored in a vector ordered by their keyframe time. Ordering of keyframes with same key time is arbitrary. This class ensures that the keyframes are always maintained in the correct order. How the values for the animated property are interpolated between successive keyframes depends on the type of the preceding keyframe. Thus this class doesn't perform the interpolation instead delegates it to the keyframe object affecting the property at the current time value.

See also
vtkPVAnimationCue vtkPVCueManipulator

Definition at line 34 of file vtkPVKeyFrameCueManipulator.h.

Member Typedef Documentation

◆ Superclass

Definition at line 37 of file vtkPVKeyFrameCueManipulator.h.

Constructor & Destructor Documentation

◆ vtkPVKeyFrameCueManipulator()

vtkPVKeyFrameCueManipulator::vtkPVKeyFrameCueManipulator ( )
protected

This method iterates over all added keyframe proxies and updates the domains for all keyframes, such that for every keyframe J, with keytime between keyframes I and K, the domain for keytime of J is (DomainJ)min = KeyTimeI and (DomainJ)max = KeyTimeK.

void UpdateKeyTimeDomains();

◆ ~vtkPVKeyFrameCueManipulator()

vtkPVKeyFrameCueManipulator::~vtkPVKeyFrameCueManipulator ( )
overrideprotected

This method iterates over all added keyframe proxies and updates the domains for all keyframes, such that for every keyframe J, with keytime between keyframes I and K, the domain for keytime of J is (DomainJ)min = KeyTimeI and (DomainJ)max = KeyTimeK.

void UpdateKeyTimeDomains();

Member Function Documentation

◆ GetClassName()

virtual const char* vtkPVKeyFrameCueManipulator::GetClassName ( )
virtual

Reimplemented from vtkPVCueManipulator.

Reimplemented in vtkPVCameraCueManipulator.

◆ IsTypeOf()

static int vtkPVKeyFrameCueManipulator::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkPVKeyFrameCueManipulator::IsA ( const char *  type)
virtual

Reimplemented from vtkPVCueManipulator.

Reimplemented in vtkPVCameraCueManipulator.

◆ SafeDownCast()

static vtkPVKeyFrameCueManipulator* vtkPVKeyFrameCueManipulator::SafeDownCast ( vtkObject o)
static

◆ PrintSelf()

void vtkPVKeyFrameCueManipulator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Reimplemented from vtkPVCueManipulator.

◆ New()

static vtkPVKeyFrameCueManipulator* vtkPVKeyFrameCueManipulator::New ( )
static

◆ AddKeyFrame()

int vtkPVKeyFrameCueManipulator::AddKeyFrame ( vtkPVKeyFrame keyframe)

Add a key frame.

Key frames are stored in a map, keyed by the KeyFrameTime. If two keyframes have the same key time, only one of then will be considered. It returns the index of the added frame in the collection.

◆ GetLastAddedKeyFrameIndex()

virtual int vtkPVKeyFrameCueManipulator::GetLastAddedKeyFrameIndex ( )
virtual

This method returns the index of the last added key frame.

Note that this index is valid only until none of the keyframes are modified. This is even provided as a method so that this value can be accessed via properties.

◆ RemoveKeyFrame()

void vtkPVKeyFrameCueManipulator::RemoveKeyFrame ( vtkPVKeyFrame keyframe)

Removes a key frame at the specified time, if any.

◆ RemoveAllKeyFrames()

void vtkPVKeyFrameCueManipulator::RemoveAllKeyFrames ( )

Removes all key frames, if any.

◆ GetKeyFrame()

vtkPVKeyFrame* vtkPVKeyFrameCueManipulator::GetKeyFrame ( double  time)

Returns a pointer to the key frame at the given time.

If no key frame exists at the given time, it returns nullptr.

◆ GetStartKeyFrame()

vtkPVKeyFrame* vtkPVKeyFrameCueManipulator::GetStartKeyFrame ( double  time)

Given the current time, determine the key frames between which the current time lies.

Returns the key frame time. If the current time coincides with a key frame, both methods (GetStartKeyFrameTime and GetEndKeyFrameTime) return that key keyframes time which is same as time. If the current time is before the first key frame or after the last key frame, then this method return -1.

◆ GetEndKeyFrame()

vtkPVKeyFrame* vtkPVKeyFrameCueManipulator::GetEndKeyFrame ( double  time)

Given the current time, determine the key frames between which the current time lies.

Returns the key frame time. If the current time coincides with a key frame, both methods (GetStartKeyFrameTime and GetEndKeyFrameTime) return that key keyframes time which is same as time. If the current time is before the first key frame or after the last key frame, then this method return -1.

◆ GetNextKeyFrame()

vtkPVKeyFrame* vtkPVKeyFrameCueManipulator::GetNextKeyFrame ( vtkPVKeyFrame keyFrame)

Get the next/previous key frame relative to argument key frame.

Returns nullptr when no next/previous frame exists.

◆ GetPreviousKeyFrame()

vtkPVKeyFrame* vtkPVKeyFrameCueManipulator::GetPreviousKeyFrame ( vtkPVKeyFrame keyFrame)

Get the next/previous key frame relative to argument key frame.

Returns nullptr when no next/previous frame exists.

◆ GetNumberOfKeyFrames()

unsigned int vtkPVKeyFrameCueManipulator::GetNumberOfKeyFrames ( )

Get the number of keyframes.

◆ GetKeyFrameAtIndex()

vtkPVKeyFrame* vtkPVKeyFrameCueManipulator::GetKeyFrameAtIndex ( int  index)

Access the keyframe collection using the indices.

Keyframes are sorted according to increasing key frame time.

◆ Initialize()

void vtkPVKeyFrameCueManipulator::Initialize ( vtkPVAnimationCue )
overrideprotectedvirtual

This method is called when the AnimationCue's StartAnimationCueEvent is triggered, to let the animation manipulator know that the cue has been restarted.

This is here for one major reason: after the last key frame, the state of the scene must be as it was left at the last key frame. This does not happen automatically, since if while animating the currentime never coincides with the last key frame's key time, then it never gets a chance to update the properties value. Hence, we note when the cue begins. Then, if the currentime is beyond that of the last key frame we pretend that the current time coincides with that of the last key frame and let it update the properties. This is done only once per Animation cycle. The Initialize method is used to indicate that a new animation cycle has begun.

Reimplemented from vtkPVCueManipulator.

◆ Finalize()

void vtkPVKeyFrameCueManipulator::Finalize ( vtkPVAnimationCue )
overrideprotectedvirtual

This method is called when the AnimationCue's EndAnimationCueEvent is triggered.

Typically, the Manipulator will set the state of the Cue to that at the end of the cue.

Reimplemented from vtkPVCueManipulator.

◆ UpdateValue()

void vtkPVKeyFrameCueManipulator::UpdateValue ( double  currenttime,
vtkPVAnimationCue cueproxy 
)
overrideprotectedvirtual

This updates the values based on currenttime.

currenttime is normalized to the time range of the Cue.

Implements vtkPVCueManipulator.

◆ AddKeyFrameInternal()

int vtkPVKeyFrameCueManipulator::AddKeyFrameInternal ( vtkPVKeyFrame keyframe)
protected

◆ RemoveKeyFrameInternal()

int vtkPVKeyFrameCueManipulator::RemoveKeyFrameInternal ( vtkPVKeyFrame keyframe)
protected

◆ ExecuteEvent()

void vtkPVKeyFrameCueManipulator::ExecuteEvent ( vtkObject obj,
unsigned long  event,
void *   
)
protected

Friends And Related Function Documentation

◆ vtkPVKeyFrameCueManipulatorObserver

friend class vtkPVKeyFrameCueManipulatorObserver
friend

Definition at line 151 of file vtkPVKeyFrameCueManipulator.h.

Member Data Documentation

◆ Internals

vtkPVKeyFrameCueManipulatorInternals* vtkPVKeyFrameCueManipulator::Internals
protected

Definition at line 141 of file vtkPVKeyFrameCueManipulator.h.

◆ Observer

vtkPVKeyFrameCueManipulatorObserver* vtkPVKeyFrameCueManipulator::Observer
protected

Definition at line 152 of file vtkPVKeyFrameCueManipulator.h.

◆ SendEndEvent

int vtkPVKeyFrameCueManipulator::SendEndEvent
protected

Definition at line 155 of file vtkPVKeyFrameCueManipulator.h.

◆ LastAddedKeyFrameIndex

int vtkPVKeyFrameCueManipulator::LastAddedKeyFrameIndex
protected

Definition at line 156 of file vtkPVKeyFrameCueManipulator.h.


The documentation for this class was generated from the following file: