[vtk-developers] Fixed vtkInteractorStyleTrackball*

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Mar 14 06:15:14 EST 2002


>>>>> "PR" == Prabhu Ramachandran <prabhu at aero.iitm.ernet.in> writes:

    PR> I'll try to add a SetDesiredUpdateRate and SetStillUpdateRate
    PR> to the vtkTkRenderWidget.py sometime later this week.  This
    PR> way maybe the other Python widgets will work well with LOD
    PR> actors.

I just committed these changes to CVS.  I've added
Set/GetDesiredUpdateRate and Set/GetStillUpdateRate methods to the Tk,
wxPython and Qt widgets.  I cannot test the Qt widget and would
appreciate if someone could just take a look at it.  These changes
(very small) allow one to use LOD actors along with these widgets.  So
far it seems to work well.  At the end of the email is a sample
Tkinter app that demos it.  Let me know if there are problems.

cheers,
prabhu

# --------------------
from vtk import *
import vtkRenderWidget, Tkinter

r = Tkinter.Tk()
vtk_wid = vtkRenderWidget.vtkTkRenderWidget(r, width=500, height=500)
ren = vtkRenderer()
vtk_wid.GetRenderWindow().AddRenderer(ren)
vtk_wid.SetDesiredUpdateRate(1000) 
# set it large so we are forced to see the LOD in action.

cone = vtkConeSource()
cone.SetResolution(800)
coneMapper = vtkPolyDataMapper()
coneMapper.SetInput(cone.GetOutput())
coneActor = vtkLODActor()
coneActor.SetMapper(coneMapper)
ren.AddActor(coneActor)

vtk_wid.pack()
r.mainloop()




More information about the vtk-developers mailing list