GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Class represents animation as a sequence of states (views). More...
Public Member Functions | |
def | __init__ |
Animation constructor. More... | |
def | Start |
Start recording/playing. More... | |
def | Pause |
Pause recording/playing. More... | |
def | Stop |
Stop recording/playing. More... | |
def | Update |
Record/play next view state (on timer event) More... | |
def | Record |
Record new view state. More... | |
def | Play |
Render next frame. More... | |
def | IterAnimation |
def | UpdateView |
Update view data in map window and render. More... | |
def | IsRunning |
Test if timer is running. More... | |
def | SetMode |
Start animation mode. More... | |
def | GetMode |
Get animation mode (record, play, save) More... | |
def | IsPaused |
Test if animation is paused. More... | |
def | SetPause |
def | Exists |
Returns if an animation has been recorded. More... | |
def | GetFrameCount |
Return number of recorded frames. More... | |
def | Clear |
Clear all records. More... | |
def | GoToFrame |
Render frame of given index. More... | |
def | PostFinishedEvent |
Animation ends. More... | |
def | PostUpdateIndexEvent |
Frame index changed, update tool window. More... | |
def | StopSaving |
Abort image files generation. More... | |
def | IsSaved |
def | SaveAnimationFile |
Generate image files. More... | |
def | SetFPS |
Set Frames Per Second value. More... | |
def | GetInterval |
Return timer interval in ms. More... | |
Data Fields | |
animationList | |
timer | |
mapWindow | |
actions | |
formats | |
mode | |
paused | |
currentFrame | |
fps | |
stopSaving | |
animationSaved | |
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.
def animation.Animation.__init__ | ( | self, | |
mapWindow, | |||
timer | |||
) |
Animation constructor.
mapWindow | glWindow where rendering takes place |
timer | timer for recording and replaying |
Definition at line 32 of file animation.py.
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.IterAnimation | ( | self | ) |
Definition at line 89 of file animation.py.
References animation.Animation.animationList, animation.Animation.currentFrame, animation.Animation.PostUpdateIndexEvent(), and animation.Animation.UpdateView().
Referenced by animation.Animation.Play().
def animation.Animation.Pause | ( | self | ) |
Pause recording/playing.
Definition at line 57 of file animation.py.
def animation.Animation.Play | ( | self | ) |
Render next frame.
Definition at line 78 of file animation.py.
References animation.Animation.animationList, animation.Animation.IterAnimation(), and animation.Animation.Stop().
def animation.Animation.PostFinishedEvent | ( | self | ) |
Animation ends.
Definition at line 150 of file animation.py.
References animation.Animation.mode.
Referenced by animation.Animation.SaveAnimationFile(), and animation.Animation.Stop().
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 | ) |
Record new view state.
Definition at line 70 of file animation.py.
References animation.Animation.animationSaved, animation.Animation.currentFrame, and animation.Animation.PostUpdateIndexEvent().
def animation.Animation.SaveAnimationFile | ( | self, | |
path, | |||
prefix, | |||
format | |||
) |
Generate image files.
path | path to direcory |
prefix | file prefix |
format | index of image file format |
Definition at line 170 of file animation.py.
References animation.Animation.animationList, animation.Animation.animationSaved, animation.Animation.currentFrame, animation.Animation.formats, animation.Animation.mode, animation.Animation.PostFinishedEvent(), animation.Animation.stopSaving, and animation.Animation.UpdateView().
def animation.Animation.SetFPS | ( | self, | |
fps | |||
) |
Set Frames Per Second value.
fps | frames per second |
Definition at line 199 of file animation.py.
References animation.Animation.fps.
def animation.Animation.SetMode | ( | self, | |
mode | |||
) |
Start animation mode.
mode | animation 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 | ) |
Record/play next view state (on timer event)
Definition at line 66 of file animation.py.
References animation.Animation.actions, model.ProcessModelFile.actions, and animation.Animation.mode.
Referenced by wizard.DatumPage.OnDText(), colorrules.VectorColorTable.OnLayerSelection(), manager.GroupPage.OnMkGroup(), and mapwindow.BufferedWindow.TextBounds().
def animation.Animation.UpdateView | ( | self, | |
params | |||
) |
Update view data in map window and render.
Definition at line 96 of file animation.py.
Referenced by animation.Animation.GoToFrame(), animation.Animation.IterAnimation(), mapwindow.GLWindow.OnUpdateView(), animation.Animation.SaveAnimationFile(), and mapwindow.GLWindow.UnloadDataLayers().
animation.Animation.actions |
Definition at line 42 of file animation.py.
Referenced by animation.Animation.Update().
animation.Animation.animationList |
Definition at line 39 of file animation.py.
Referenced by animation.Animation.Clear(), animation.Animation.Exists(), animation.Animation.GetFrameCount(), animation.Animation.GoToFrame(), animation.Animation.IterAnimation(), animation.Animation.Play(), and animation.Animation.SaveAnimationFile().
animation.Animation.animationSaved |
Definition at line 51 of file animation.py.
Referenced by animation.Animation.IsSaved(), animation.Animation.Record(), and animation.Animation.SaveAnimationFile().
animation.Animation.currentFrame |
Definition at line 47 of file animation.py.
Referenced by animation.Animation.Clear(), animation.Animation.GoToFrame(), animation.Animation.IterAnimation(), animation.Animation.Record(), and animation.Animation.SaveAnimationFile().
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.mapWindow |
Definition at line 41 of file animation.py.
Referenced by wxdigit.IVDigit.AddFeature(), tools.LightPositionWindow.PostDraw(), tools.NvizToolWindow.PostLightEvent(), tools.NvizToolWindow.PostViewEvent(), tools.ViewPositionWindow.UpdatePos(), tools.LightPositionWindow.UpdatePos(), and tools.NvizToolWindow.UpdateScrolling().
animation.Animation.mode |
Definition at line 45 of file animation.py.
Referenced by animation.Animation.GetMode(), animation.Animation.PostFinishedEvent(), animation.Animation.PostUpdateIndexEvent(), animation.Animation.SaveAnimationFile(), animation.Animation.SetMode(), and animation.Animation.Update().
animation.Animation.paused |
Definition at line 46 of file animation.py.
Referenced by animation.Animation.IsPaused(), and animation.Animation.SetPause().
animation.Animation.stopSaving |
Definition at line 50 of file animation.py.
Referenced by animation.Animation.SaveAnimationFile(), and animation.Animation.StopSaving().
animation.Animation.timer |
Definition at line 40 of file animation.py.