[vtkusers] a little problem with threads.

Antonio Matta amatta at puj.edu.co
Fri Jun 1 11:29:44 EDT 2007


Hi,

I am using a thread to control a rendering loop that simulates the motion of an articulated
system. Everything is implemented in Python.

#starting the thread for solid rendering
thread.start_new_thread(self.rendering_loop,(ren,VTKwindow,))

def rendering_loop(self,ren,VTKwindow):		
 #simulation loop
   for i in range( (self.pt-30)/30 ):
      self.genericHMTcompute( self.X[0, i*30], self.X[1,i*30] )
      self.Link1assembly.SetUserTransform( self.Link1.Trans )
      self.Link2assembly.SetUserTransform( self.Link2.Trans )
      VTKwindow.Render()

This is done in order to rotate or translate the camera or to select a button
from my graphical user interface while the simulutation is still active.

My problem is that if I rotate or translate the camera the simulation works fine, but
if I do not choose an event the simulation stops.

Can anybode tell what is going wrong?

Thanks,

Antonio Matta.
		


Antonio Alejandro Matta Gómez.
Computer Software Engineer.
Research Assistant - Robotics and Automation Group.
Pontificia Universidad Javeriana - Cali.
Home Page: http://gar.puj.edu.co/Members/amatta/

Anyone who needs me, and whom I can help is 
my neighbor.
                          Benedict XVI.
                          Deus Caritas Est.
  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070601/b8f7b298/attachment.htm>


More information about the vtkusers mailing list