[vtkusers] Render a image in a loop while it is updating

David Doria daviddoria at gmail.com
Wed Nov 10 07:47:52 EST 2010


On Wed, Nov 10, 2010 at 7:00 AM, Jim Peterson <jimcp at cox.net> wrote:
> LuanKaun,
> you do not want to have any render functions in a loop in your program,
> the way I achieve animation is to add observer callbacks to the renderer
> for startevent and endevent. in the start event, I update the respective
> polydata objects to whatever new data is available and use the
> modified() method on each modified polydata so that the update call from
> within the renderer will reflect the new data.
> These two callbacks combined with the interactor SetStillUpdateRate()
> and SetDesiredUpdateRate() methods produce a self running animation in
> my experience.
> I had not done a simple example, but I Will see if I can make a version
> of the cone tutorial (probably in Java) to demonstrate animated vtk.
>
> Hope that helps,
> Jim

Here are some more ways to animate things:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Animation/AnimateActors
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/Animation
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/AnimationScene
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/DataAnimation
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/DataAnimationSubclass

Jim, is this what you were planning to do?
http://www.vtk.org/Wiki/VTK/Examples/Java/Visualization/Animation

David



More information about the vtkusers mailing list