vtkmodules.gtk.GtkGLExtVTKRenderWindow
#
Description:
This provides a VTK widget for pyGtk. This embeds a vtkRenderWindow inside a GTK widget. This is based on GtkVTKRenderWindow.py.
The extensions here allow the use of gtkglext rather than gtkgl and pygtk-2 rather than pygtk-0. It requires pygtk-2.0.0 or later.
There is a working example at the bottom.
Credits:
John Hunter jdhunter@ace.bsd.uchicago.edu developed and tested this code based on VTK’s GtkVTKRenderWindow.py and extended it to work with pygtk-2.0.0.
License:
VTK license.
Module Contents#
Classes#
A base class that enables one to embed a vtkRenderWindow into a pyGTK widget. This class embeds the RenderWindow correctly. Provided are some empty methods that can be overloaded to provide a user defined interaction behaviour. The event handling functions have names that are somewhat similar to the ones in the vtkInteractorStyle class included with VTK. |
|
An example of a fully functional GtkGLExtVTKRenderWindow that is based on the vtkRenderWidget.py provided with the VTK sources. |
Functions#
API#
- class vtkmodules.gtk.GtkGLExtVTKRenderWindow.GtkGLExtVTKRenderWindowBase(*args)#
Bases:
gtk.gtkgl.DrawingArea
A base class that enables one to embed a vtkRenderWindow into a pyGTK widget. This class embeds the RenderWindow correctly. Provided are some empty methods that can be overloaded to provide a user defined interaction behaviour. The event handling functions have names that are somewhat similar to the ones in the vtkInteractorStyle class included with VTK.
Initialization
- ConnectSignals()#
- GetRenderWindow()#
- GetRenderer()#
- SetDesiredUpdateRate(rate)#
Mirrors the method with the same name in vtkRenderWindowInteractor.
- GetDesiredUpdateRate()#
Mirrors the method with the same name in vtkRenderWindowInteractor.
- SetStillUpdateRate(rate)#
Mirrors the method with the same name in vtkRenderWindowInteractor.
- GetStillUpdateRate()#
Mirrors the method with the same name in vtkRenderWindowInteractor.
- Render()#
- OnRealize(*args)#
- Created()#
- OnConfigure(widget, event)#
- OnExpose(*args)#
- OnDestroy(*args)#
- OnButtonDown(wid, event)#
Mouse button pressed.
- OnButtonUp(wid, event)#
Mouse button released.
- OnMouseMove(wid, event)#
Mouse has moved.
- OnEnter(wid, event)#
Entering the vtkRenderWindow.
- OnLeave(wid, event)#
Leaving the vtkRenderWindow.
- OnKeyPress(wid, event)#
Key pressed.
- OnKeyRelease(wid, event)#
Key released.
- class vtkmodules.gtk.GtkGLExtVTKRenderWindow.GtkGLExtVTKRenderWindow(*args)#
Bases:
vtkmodules.gtk.GtkGLExtVTKRenderWindow.GtkGLExtVTKRenderWindowBase
An example of a fully functional GtkGLExtVTKRenderWindow that is based on the vtkRenderWidget.py provided with the VTK sources.
Initialization
- OnButtonDown(wid, event)#
- OnButtonUp(wid, event)#
- OnMouseMove(wid, event=None)#
- OnEnter(wid, event=None)#
- OnKeyPress(wid, event=None)#
- GetZoomFactor()#
- SetZoomFactor(zf)#
- GetPicker()#
- Render()#
- UpdateRenderer(x, y)#
UpdateRenderer will identify the renderer under the mouse and set up _CurrentRenderer, _CurrentCamera, and _CurrentLight.
- GetCurrentRenderer()#
- GetCurrentCamera()#
- StartMotion(wid, event=None)#
- EndMotion(wid, event=None)#
- Rotate(x, y)#
- Pan(x, y)#
- Zoom(x, y)#
- Reset()#
- Wireframe()#
- Surface()#
- PickActor(x, y)#
- vtkmodules.gtk.GtkGLExtVTKRenderWindow.main()#