[vtkusers] Update of actor

Roger Blum roger_blum at swissonline.ch
Fri Sep 2 23:32:44 EDT 2005


I have created several actors with vtkGlyph3D (different colors and types)
in Tcl. I would like to update the positions of the glyphs every 5 seconds.

Thats what I do:

...
vtkPoints P
    P InsertNextPoint ...

vtkPolyData PD
    PD SetPoints P

vtkGlyph3D G3D
    G3D SetInput PD
    G3D SetSource ...

vtkPolyDataMapper PDM
    PDM SetInput [G3D GetOutput]

vtkActor A
    A SetMapper PDM

vtkRenderer R
    R AddActor A

vtkRenderWindow RW
    RW AddRenderer R

vtkRenderWindowInteractor RWI
    RWI SetRenderWindow RW

My first try was to simply Reset the points object and add the new points.
But nothing seemed to happen at all. The new points were simply ignored.
Then I initialized the polydata object and set the point object P again. 
Doing
this, the new points seemed to be passed through the pipeline.
But this is not enough to update the visualisation.It only gets updated, 
when
I click in the window with the mouse.

To force the update of the actor I 've tried:
A Render R PDM
and
R Render
but both times nothing happened on the display.

How do I efficiently update the positions?
Which object do I have to update to have the actor refreshed on the display?

Thanks for any help,
Roger







More information about the vtkusers mailing list