[vtkusers] Modifying vtkPolyData
David Gobbi
david.gobbi at gmail.com
Sun Feb 28 13:52:31 EST 2010
On Sun, Feb 28, 2010 at 11:33 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
>
> Gotcha. All
> fixed: http://www.vtk.org/Wiki/VTK/Examples/Utilities/DataAnimation
> And here is how to do it by subclassing vtkCommand:
> http://www.vtk.org/Wiki/VTK/Examples/Utilities/DataAnimationSubclass
> Thanks for getting these back on track, David G. This is why we need these
> examples :)
Much better. Though, programmableFilter->Modified() should be called
before iren->Render(), not after. Likewise, the "counter" variable
should be incremented in the timer callback, not in the execute. The
idea is that you want to increment the counter every 500 milliseconds.
For example: if the user is rotating the scene with the interactor,
then Render will be called a bunch of times. And if, let's say,
something is happening to the sphere that causes it to be modified,
then these extra renders will cause the filter to execute more often
than the timer callback gets called. Hence, the filter callback is
the wrong place to increment the counter.
> Jordi - hopefully you will have a pleasant surprise next time you check your
> email with all of this discussion :)
We have pretty much hijacked his originally question for our own
purposes, haven't we?
David
More information about the vtkusers
mailing list