[vtkusers] updating a scene

Jeff Lee jeff at cdnorthamerica.com
Tue Jul 29 08:09:59 EDT 2003


once you invoke rwi->Start(), your app enters an event loop in which 
case there is no way to change the scene externally (other than 
attaching a UserEvent observer i.e. the 'u' kepress would invoke your 
user method which could add/remove actors... very limited except for 
quick&dirty pipeline vis) until you break the loop (terminate the app).  
your other alternative would be to have your own application-level loop 
for capturing events and manually pass the events to the rwi.  you can 
look at something like vtkQt to see how its done.
-Jeff

Luke J West wrote:

>Thanks for that reply, Jeff,
>
>does anybody know of an example that demonstrates "turning actors on and off"
>
>If I change my scene using _renderer->AddActor(...) or ->RemoveActor(...) after
>rwi->Start(...) and ->Initialize(...) the scene remains unchanged on invocation
>of either renderWindow->Render() and/or rwi->Render() in any order.
>
>I have three Renderers but only one RenderWindow.
>
>Perhaps there something else I need to do?
>
>thanks,
>
>luke
>
>  
>
>>_renderWindow->Render();
>>
>>Luke J West wrote:
>>
>>    
>>
>>>Hi - should be an easy one...
>>>
>>>if I have changed a scene with ->AddActor and ->RemoveActor on a
>>>      
>>>
>>vtkRenderer,
>>    
>>
>>>what method do I call on what object to reflect the changes on my
>>>      
>>>
>>screenobject)
>>    
>>
>>>thanks,
>>>
>>>      
>>>





More information about the vtkusers mailing list