[vtkusers] Help with vtkActorCollection
    Johanna 
    pettersson.johanna at home.se
       
    Wed Jul 23 04:35:23 EDT 2003
    
    
  
Hi,
I am trying to use a vtkActorCollection to remove all actors in the renderer. My tcl code looks like this:
    vtkActorCollection allActors
    set allActors [ren1 GetActors]    
    allActors InitTraversal
followed by a for loop where I traverse the list and remove the actors. However, my problem must be in the code above somewhere since the vtkActorCollection is empty also after the command 'set allActors [ren GetActors]' allthough there are four actors in the renderer.
The command 'ren1 VisibleActorCount' returns 4, while 'allActors GetNumberOfItems' returns 0. If I have understand everything correct these two commands should generate the same result since 'allActors' should contain the four actors in the renderer.
What am I doing wrong? Is there some other way to access the actors in the renderer, or is 'ren GetActors' the only way?
Thank you
/Johanna
    
    
More information about the vtkusers
mailing list