[vtkusers] Changing model while interacting

Anderson Maciel incroyable at bol.com.br
Tue Nov 27 05:27:29 EST 2001


Thanks K, but I already tried threads like this:

//>>>>>>>>
MyThread *th = new MyThread( sphere2, renWin );
 printf( "starting thread... \n" );
 th->Start( NULL );
 printf( "thread running. \n " );

 MyInteractor->Start();
//<<<<<<<<

The execution never reaches the printf below th->Start, and so, MyInteractor
is never started.

In the thread code I have a looping that run continuously in order to modify
an actor position:

//>>>>>>>>
while( 1 ){
  sphere->SetCenter( x+=delta, 0, 0 );
      if( x >= 5 ) delta = -0.01;
      if( x <= 1 ) delta = 0.01;
 }
//<<<<<<<<

A.

----- Original Message -----
From: "K.R.Subramanian" <krs at cs.uncc.edu>
To: "Anderson Maciel" <incroyable at bol.com.br>
Sent: Tuesday, November 27, 2001 6:47 AM
Subject: Re: [vtkusers] Changing model while interacting


> I have done this in Xt/Motif using XtApplication procedures - sort of
their analog
> of threads.
>
> You might be able to use threads in VTK (I havent done this and know very
little), so
> that the dynamics of your actors are running on a separate thread,
independent
> of the interactor.
>
>     -- krs
>
> --





More information about the vtkusers mailing list