FreeMat
vtkAnimationScene

Section: Visualization Toolkit Common Classes

Usage

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 of individual cues or other scenes.

A scene can be played in real time mode, or as a seqence of frames 1/frame rate apart in time.

To create an instance of class vtkAnimationScene, simply invoke its constructor as follows

  obj = vtkAnimationScene

Methods

The class vtkAnimationScene has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkAnimationScene class.

  • string = obj.GetClassName ()
  • int = obj.IsA (string name)
  • vtkAnimationScene = obj.NewInstance ()
  • vtkAnimationScene = obj.SafeDownCast (vtkObject o)
  • obj.SetPlayMode (int ) - Get/Set the PlayMode for running/playing the animation scene. In the Sequence mode, all the frames are generated one after the other. The time reported to each Tick of the constituent cues (during Play) is incremented by 1/frame rate, irrespective of the current time. In the RealTime mode, time indicates the instance in time.
  • obj.SetModeToSequence () - Get/Set the PlayMode for running/playing the animation scene. In the Sequence mode, all the frames are generated one after the other. The time reported to each Tick of the constituent cues (during Play) is incremented by 1/frame rate, irrespective of the current time. In the RealTime mode, time indicates the instance in time.
  • obj.SetModeToRealTime () - Get/Set the PlayMode for running/playing the animation scene. In the Sequence mode, all the frames are generated one after the other. The time reported to each Tick of the constituent cues (during Play) is incremented by 1/frame rate, irrespective of the current time. In the RealTime mode, time indicates the instance in time.
  • int = obj.GetPlayMode () - Get/Set the PlayMode for running/playing the animation scene. In the Sequence mode, all the frames are generated one after the other. The time reported to each Tick of the constituent cues (during Play) is incremented by 1/frame rate, irrespective of the current time. In the RealTime mode, time indicates the instance in time.
  • obj.SetFrameRate (double ) - Get/Set the frame rate (in frames per second). This parameter affects only in the Sequence mode. The time interval indicated to each cue on every tick is progressed by 1/frame-rate seconds.
  • double = obj.GetFrameRate () - Get/Set the frame rate (in frames per second). This parameter affects only in the Sequence mode. The time interval indicated to each cue on every tick is progressed by 1/frame-rate seconds.
  • obj.AddCue (vtkAnimationCue cue) - Add/Remove an AnimationCue to/from the Scene. It's an error to add a cue twice to the Scene.
  • obj.RemoveCue (vtkAnimationCue cue) - Add/Remove an AnimationCue to/from the Scene. It's an error to add a cue twice to the Scene.
  • obj.RemoveAllCues () - Add/Remove an AnimationCue to/from the Scene. It's an error to add a cue twice to the Scene.
  • int = obj.GetNumberOfCues () - Add/Remove an AnimationCue to/from the Scene. It's an error to add a cue twice to the Scene.
  • obj.Play () - Starts playing the animation scene. Fires a vtkCommand::StartEvent before play beings and vtkCommand::EndEvent after play ends.
  • obj.Stop () - Stops the animation scene that is running.
  • obj.SetLoop (int ) - Enable/Disable animation loop.
  • int = obj.GetLoop () - Enable/Disable animation loop.
  • obj.SetAnimationTime (double time) - Makes the state of the scene same as the given time.
  • double = obj.GetAnimationTime () - Makes the state of the scene same as the given time.
  • obj.SetTimeMode (int mode) - Overridden to allow change to Normalized mode only if none of the constituent cues is in Relative time mode.
  • int = obj.IsInPlay ()