[vtkusers] vtkInteractorStyle and animation

Akshay Sthapit sthapit at yahoo.com
Wed Jul 28 22:02:17 EDT 2004


Genius!  That works :)  Thanks Sean.

Akshay

--- Sean McInerney <seanm at nmr.mgh.harvard.edu> wrote:
> 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
> > 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the vtkusers mailing list