[vtkusers] vtkInteractorStyle and animation
Sean McInerney
seanm at nmr.mgh.harvard.edu
Wed Jul 28 19:16:09 EDT 2004
Akshay,
It probably segfaults since the Style is not yet associated with an
Interactor. Try rearranging your code like this:
vtkInteractorStyle *style = vtkInteractorStyle::New();
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
iren->SetInteractorStyle(style);
style->StartAnimate();
iren->Start();
Does this work?
-Sean
Akshay Sthapit wrote:
> Can someone please tell me why the following code causes a crash? I'm
> trying to create a simple animation
>
> ---------------------------------------------------------
> vtkInteractorStyle *style = vtkInteractorStyle::New();
> style->StartAnimate();
>
> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
> iren->SetRenderWindow(renWin);
> iren->SetInteractorStyle(style);
> iren->Start();
> ----------------------------------------------------------
>
> Thanks!
> Akshay
>
More information about the vtkusers
mailing list