[vtkusers] Removing al actors from a Renderer (I get multiple XYPlots in one renderer)

Nico Vermaas vermaas at astron.nl
Fri Apr 4 01:57:55 EST 2003


I want to draw and update an XYPlotActor, but when I draw a new one (by
addingAddActor2D(xyplot)) then the old one just also stays in there. So
I need to delete the old one first. 

I tried this... and I do get the right count that increases every time
I add an actor. But the Removing part  does not work.

vtkActorCollection *actors = vtkActorCollection::New();
int NumberOfActors = renderer->VisibleActorCount();

for (int i=0; i<NumberOfActors; i++) {


Q: How do I delete all actors from a renderer?


More information about the vtkusers mailing list