ParaView
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
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]

List of all members.

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
int AddKeyFrame (vtkPVKeyFrame *keyframe)
void RemoveKeyFrame (vtkPVKeyFrame *keyframe)
void RemoveAllKeyFrames ()
vtkPVKeyFrameGetKeyFrame (double time)
unsigned int GetNumberOfKeyFrames ()
vtkPVKeyFrameGetKeyFrameAtIndex (int index)
virtual int GetLastAddedKeyFrameIndex ()
vtkPVKeyFrameGetStartKeyFrame (double time)
vtkPVKeyFrameGetEndKeyFrame (double time)
vtkPVKeyFrameGetNextKeyFrame (vtkPVKeyFrame *keyFrame)
vtkPVKeyFrameGetPreviousKeyFrame (vtkPVKeyFrame *keyFrame)

Static Public Member Functions

static int IsTypeOf (const char *type)
static
vtkPVKeyFrameCueManipulator
SafeDownCast (vtkObject *o)
static
vtkPVKeyFrameCueManipulator
New ()

Protected Member Functions

virtual void Initialize (vtkPVAnimationCue *)
virtual void Finalize (vtkPVAnimationCue *)
int AddKeyFrameInternal (vtkPVKeyFrame *keyframe)
int RemoveKeyFrameInternal (vtkPVKeyFrame *keyframe)
void ExecuteEvent (vtkObject *obj, unsigned long event, void *)
 vtkPVKeyFrameCueManipulator ()
 ~vtkPVKeyFrameCueManipulator ()
virtual void UpdateValue (double currenttime, vtkPVAnimationCue *cueproxy)

Protected Attributes

vtkPVKeyFrameCueManipulatorInternals * Internals
vtkPVKeyFrameCueManipulatorObserver * Observer
int SendEndEvent
int LastAddedKeyFrameIndex

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 arbritary. 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 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 45 of file vtkPVKeyFrameCueManipulator.h.


Constructor & Destructor Documentation

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 ( ) [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();


Member Function Documentation

virtual const char* vtkPVKeyFrameCueManipulator::GetClassName ( ) [virtual]

Reimplemented from vtkPVCueManipulator.

Reimplemented in vtkPVCameraCueManipulator.

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

Reimplemented from vtkPVCueManipulator.

Reimplemented in vtkPVCameraCueManipulator.

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

Reimplemented from vtkPVCueManipulator.

Reimplemented in vtkPVCameraCueManipulator.

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

Reimplemented from vtkPVCueManipulator.

Reimplemented in vtkPVCameraCueManipulator.

void vtkPVKeyFrameCueManipulator::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkPVCueManipulator.

Reimplemented in vtkPVCameraCueManipulator.

static vtkPVKeyFrameCueManipulator* vtkPVKeyFrameCueManipulator::New ( ) [static]

Reimplemented from vtkObject.

Reimplemented in vtkPVCameraCueManipulator.

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.

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.

void vtkPVKeyFrameCueManipulator::RemoveKeyFrame ( vtkPVKeyFrame keyframe)

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

void vtkPVKeyFrameCueManipulator::RemoveAllKeyFrames ( )

Removes all key frames, if any.

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 NULL.

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.

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.

vtkPVKeyFrame* vtkPVKeyFrameCueManipulator::GetNextKeyFrame ( vtkPVKeyFrame keyFrame)

Get the next/previous key frame relative to argument key frame. Returns NULL when no next/previous frame exists.

vtkPVKeyFrame* vtkPVKeyFrameCueManipulator::GetPreviousKeyFrame ( vtkPVKeyFrame keyFrame)

Get the next/previous key frame relative to argument key frame. Returns NULL when no next/previous frame exists.

unsigned int vtkPVKeyFrameCueManipulator::GetNumberOfKeyFrames ( )

Get the number of keyframes.

vtkPVKeyFrame* vtkPVKeyFrameCueManipulator::GetKeyFrameAtIndex ( int  index)

Access the keyframe collection using the indices. Keyframes are sorted according to increasing key frame time.

virtual void vtkPVKeyFrameCueManipulator::Initialize ( vtkPVAnimationCue ) [protected, virtual]

This method is called when the AnimationCue's StartAnimationCueEvent is triggerred, 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 a the the last key frame. This does not happend 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.

Reimplemented in vtkPVCameraCueManipulator.

virtual void vtkPVKeyFrameCueManipulator::Finalize ( vtkPVAnimationCue ) [protected, virtual]

This method is called when the AnimationCue's EndAnimationCueEvent is triggerred. Typically, the Manipulator will set the state of the Cue to that at the end of the cue.

Reimplemented from vtkPVCueManipulator.

Reimplemented in vtkPVCameraCueManipulator.

virtual void vtkPVKeyFrameCueManipulator::UpdateValue ( double  currenttime,
vtkPVAnimationCue cueproxy 
) [protected, virtual]

This updates the values based on currenttime. currenttime is normalized to the time range of the Cue.

Implements vtkPVCueManipulator.

Reimplemented in vtkPVCameraCueManipulator.

int vtkPVKeyFrameCueManipulator::AddKeyFrameInternal ( vtkPVKeyFrame keyframe) [protected]
int vtkPVKeyFrameCueManipulator::RemoveKeyFrameInternal ( vtkPVKeyFrame keyframe) [protected]
void vtkPVKeyFrameCueManipulator::ExecuteEvent ( vtkObject obj,
unsigned long  event,
void *   
) [protected]

Friends And Related Function Documentation

friend class vtkPVKeyFrameCueManipulatorObserver [friend]

Definition at line 141 of file vtkPVKeyFrameCueManipulator.h.


Member Data Documentation

vtkPVKeyFrameCueManipulatorInternals* vtkPVKeyFrameCueManipulator::Internals [protected]

Definition at line 129 of file vtkPVKeyFrameCueManipulator.h.

vtkPVKeyFrameCueManipulatorObserver* vtkPVKeyFrameCueManipulator::Observer [protected]

Definition at line 142 of file vtkPVKeyFrameCueManipulator.h.

Definition at line 145 of file vtkPVKeyFrameCueManipulator.h.

Definition at line 146 of file vtkPVKeyFrameCueManipulator.h.


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