[vtkusers] How to update PolyDataMapper?

andre at ynic.york.ac.uk andre at ynic.york.ac.uk
Thu Jan 8 04:56:48 EST 2009


vtkPolyDataMapper has an Update() function which can be called and
recalled at any time in the stream .. in Python this would be:

map = vtk.vtkPolyDataMapper()
...
...
map.Update()

This should update the mapper with data from the stream and then update
the actor dependent on the mapper when you call Render() in the
renderwindow / widget / renderer.

Alternatively (or perhaps in addition?), vtkPolyDataMapper has a
Modified() function which can be used in the similar way.

map = vtk.vtkPolyDataMapper()
...
...
map.Modified()

I have used both with success for real-time updates during processing
streams.


> Hi everybody
>
> The thing I want to do is real-time operations with models. Now I can do a
> substraction. you can see from the pictures. The thing I want to do is, to
> move the green ball and whenever it collides with the other object, do a
> substraction again. In the compilation, program makes a substraction but
> in
> runtime it does not.
>
> How can I solve this problem?
>
> Best Regards
> Utku
>
> http://img56.imageshack.us/img56/6485/diff3sn7.jpg
>
> http://img212.imageshack.us/img212/9082/beforeoperationdm6.jpg
>
> http://img56.imageshack.us/img56/3020/controlrf0.jpg
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>





More information about the vtkusers mailing list