GRASS Programmer's Manual  6.4.4(2014)-r
animation.Animation Class Reference

Class represents animation as a sequence of states (views). More...

Public Member Functions

def __init__ (self, mapWindow, timer)
 Animation constructor. More...
 
def Start (self)
 Start recording/playing. More...
 
def Pause (self)
 Pause recording/playing. More...
 
def Stop (self)
 Stop recording/playing. More...
 
def Update (self)
 Record/play next view state (on timer event) More...
 
def Record (self)
 Record new view state. More...
 
def Play (self)
 Render next frame. More...
 
def IterAnimation (self)
 
def UpdateView (self, params)
 Update view data in map window and render. More...
 
def IsRunning (self)
 Test if timer is running. More...
 
def SetMode (self, mode)
 Start animation mode. More...
 
def GetMode (self)
 Get animation mode (record, play, save) More...
 
def IsPaused (self)
 Test if animation is paused. More...
 
def SetPause (self, pause)
 
def Exists (self)
 Returns if an animation has been recorded. More...
 
def GetFrameCount (self)
 Return number of recorded frames. More...
 
def Clear (self)
 Clear all records. More...
 
def GoToFrame (self, index)
 Render frame of given index. More...
 
def PostFinishedEvent (self)
 Animation ends. More...
 
def PostUpdateIndexEvent (self, index)
 Frame index changed, update tool window. More...
 
def StopSaving (self)
 Abort image files generation. More...
 
def IsSaved (self)
 
def SaveAnimationFile (self, path, prefix, format)
 Generate image files. More...
 
def SetFPS (self, fps)
 Set Frames Per Second value. More...
 
def GetInterval (self)
 Return timer interval in ms. More...
 

Data Fields

 animationList
 
 timer
 
 mapWindow
 
 actions
 
 formats
 
 mode
 
 paused
 
 currentFrame
 
 fps
 
 stopSaving
 
 animationSaved
 

Detailed Description

Class represents animation as a sequence of states (views).

It enables to record, replay the sequence and finally generate all image files. Recording and replaying is based on timer events. There is no frame interpolation like in the Tcl/Tk based Nviz.

Definition at line 26 of file animation.py.

Constructor & Destructor Documentation

def animation.Animation.__init__ (   self,
  mapWindow,
  timer 
)

Animation constructor.

Parameters
mapWindowglWindow where rendering takes place
timertimer for recording and replaying

Definition at line 32 of file animation.py.

Member Function Documentation

def animation.Animation.Clear (   self)

Clear all records.

Definition at line 136 of file animation.py.

References animation.Animation.animationList, and animation.Animation.currentFrame.

def animation.Animation.Exists (   self)

Returns if an animation has been recorded.

Definition at line 128 of file animation.py.

References animation.Animation.animationList.

def animation.Animation.GetFrameCount (   self)

Return number of recorded frames.

Definition at line 132 of file animation.py.

References animation.Animation.animationList.

def animation.Animation.GetInterval (   self)

Return timer interval in ms.

Definition at line 205 of file animation.py.

References animation.Animation.fps.

Referenced by animation.Animation.Start().

def animation.Animation.GetMode (   self)

Get animation mode (record, play, save)

Definition at line 117 of file animation.py.

References animation.Animation.mode.

def animation.Animation.GoToFrame (   self,
  index 
)

Render frame of given index.

Definition at line 141 of file animation.py.

References animation.Animation.animationList, animation.Animation.currentFrame, and animation.Animation.UpdateView().

def animation.Animation.IsPaused (   self)

Test if animation is paused.

Definition at line 121 of file animation.py.

References animation.Animation.paused.

def animation.Animation.IsRunning (   self)

Test if timer is running.

Definition at line 106 of file animation.py.

def animation.Animation.IsSaved (   self)
"!Test if animation has been saved (to images)

Definition at line 166 of file animation.py.

References animation.Animation.animationSaved.

def animation.Animation.Pause (   self)

Pause recording/playing.

Definition at line 57 of file animation.py.

def animation.Animation.Play (   self)
def animation.Animation.PostFinishedEvent (   self)
def animation.Animation.PostUpdateIndexEvent (   self,
  index 
)

Frame index changed, update tool window.

Definition at line 156 of file animation.py.

References animation.Animation.mode.

Referenced by animation.Animation.IterAnimation(), and animation.Animation.Record().

def animation.Animation.Record (   self)
def animation.Animation.SaveAnimationFile (   self,
  path,
  prefix,
  format 
)
def animation.Animation.SetFPS (   self,
  fps 
)

Set Frames Per Second value.

Parameters
fpsframes per second

Definition at line 199 of file animation.py.

References animation.Animation.fps.

def animation.Animation.SetMode (   self,
  mode 
)

Start animation mode.

Parameters
modeanimation mode (record, play, save)

Definition at line 110 of file animation.py.

References animation.Animation.mode.

def animation.Animation.SetPause (   self,
  pause 
)

Definition at line 125 of file animation.py.

References animation.Animation.paused.

def animation.Animation.Start (   self)

Start recording/playing.

Definition at line 53 of file animation.py.

References animation.Animation.GetInterval().

def animation.Animation.Stop (   self)

Stop recording/playing.

Definition at line 61 of file animation.py.

References animation.Animation.PostFinishedEvent().

Referenced by animation.Animation.Play().

def animation.Animation.StopSaving (   self)

Abort image files generation.

Definition at line 162 of file animation.py.

References animation.Animation.stopSaving.

def animation.Animation.Update (   self)
def animation.Animation.UpdateView (   self,
  params 
)

Field Documentation

animation.Animation.actions

Definition at line 42 of file animation.py.

Referenced by animation.Animation.Update().

animation.Animation.animationSaved
animation.Animation.formats

Definition at line 44 of file animation.py.

Referenced by animation.Animation.SaveAnimationFile().

animation.Animation.fps

Definition at line 48 of file animation.py.

Referenced by animation.Animation.GetInterval(), and animation.Animation.SetFPS().

animation.Animation.paused

Definition at line 46 of file animation.py.

Referenced by animation.Animation.IsPaused(), and animation.Animation.SetPause().

animation.Animation.stopSaving
animation.Animation.timer

Definition at line 40 of file animation.py.


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