[vtkusers] Basic Animation Code

David Doria daviddoria+vtk at gmail.com
Tue Jan 5 23:28:51 EST 2010


On Wed, Dec 16, 2009 at 10:27 PM, Leon Danon <kernelblaha at gmail.com> wrote:
> Hi All,
>
> I'm attempting (and failing) to run a simple animated model where the
> position and colour of an actor (in my case a cylider) changes, while at the
> same time being rendered.
> I have done a bit of googling, but have come up with nothing very useful. My
> understanding is that it should be done with threads (one for the renderer,
> the other for the model).
> Does anyone have a simple example in C++ of how this would be implemented.
> It would be greatly appreciated.
> Thanks
> Leon

Surely someone knows how to do this? Is an example of what you want
something like a loop to move an object across the scene?

pseudo code:

for(xposition = 1; xposition < 10; xposition++)
{
  actor.setposition(xposition,0,0);
  render scene
}

Can anyone translate to VTK?

Thanks,

David



More information about the vtkusers mailing list