4

I have a VTK data file for a 3D model and I am trying to show a transformation applied to it.

I have the point coordinates/polygon data for every state in the transformation (there should be about 10-30 states), i.e. I could write another VTK file for each step.

I am trying to create a nice animation where each state would be shown for say, 1 second and then switch to the next one, as fluently as possible.

What would be the best thing to do?

Marijn
  • 10,367
  • 5
  • 59
  • 80
Hugo
  • 41
  • 1
  • 3

1 Answers1

2

There are a handful of ways to animate something in VTK, with examples on the VTK Wiki.

The easiest way is probably to subclass vtkCommand (DataAnimationSubclass), but the "VTK/right" way is with vtkAnimationScene (AnimationScene).

sudo make install
  • 5,629
  • 3
  • 36
  • 48
David Doria
  • 9,873
  • 17
  • 85
  • 147
  • 1
    `vtkAnimationScene` animate will stop `vtkRenderWindowInteractor` Loop when it Play(). That is we can not interact with RenderWindow when `vtkAnimationScene` is playing. – Honghe.Wu Nov 10 '16 at 09:06