[vtkusers] wxVTKRenderWindow + vtk3DWidget + vtkGenericRenderWindowInteractor
Charl P. Botha
c.p.botha at its.tudelft.nl
Mon May 13 08:42:56 EDT 2002
Dear VTKers,
I'm trying to use vtk3DWidgets with the wxVTKRenderWindow. Because the
wxVTKRenderWindow doesn't make use of a RenderWindowInteractor at all, using
interactor styles or vtk3DWidgets is not possible by default. However, some
kind soul wrote vtkGenericRenderWindowInteractor to remedy this problem (I
think).
Now, I tried to setup a vtkPlaneWidget (in Python) to use with the
wxVTKRenderWindow. Following an extract:
# cur_pipe['vtkActor3'] is an actor which has already been added to a renderer
# self._rws[0] is the wxVTKRenderWindow that we're working with
pw = vtk.vtkPlaneWidget()
pw.SetProp3D(cur_pipe['vtkActor3'])
pw.PlaceWidget()
rwi = vtk.vtkGenericRenderWindowInteractor()
rwi.SetRenderWindow(self._rws[0].GetRenderWindow())
pw.SetInteractor(rwi)
pw.On()
The problem is that at the line pw.SetInteractor(rwi) I get:
14:32:02: pw.SetInteractor(rwi)
14:32:02: ValueError: method requires a vtkRenderWindowInteractor, a
vtkGenericRenderWindowInteractor was provided.
Does anyone have any ideas how I could go about to fix this?
I've been thinking of writing a real wxwindows vtk RenderWindowInteractor
(in the style of cpbotha.net/vtkFlRenderWindowInteractor) and wrap that.
However, I'd prefer using the available code.
Any help would be appreciated.
Regards,
Charl
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the vtkusers
mailing list