[vtkusers] deleting actor from renderer

Florian Drescher fdrescher at gmail.com
Tue Dec 6 08:22:42 EST 2005


Hello!

Do you rerender your scene after the removal?

Have you tried using the function
void RemoveActor (vtkProp *p) from vtkRenderer?


On 12/6/05, Abeer Mahdi <abeer_adnan at hotmail.com> wrote:
> I have drawn a graph with nodes and edges using vtkPoints and vtklineSource.
> I have also made a  GUI which can change the parameters of the graph. In
> this case I have to redraw only the edges of the graph. However I cann't
> delete the 'old' edges, this causes the graph to get bigger and bigger
> (because no edges are removed).
> I'm using vtk on Java and using vtkPanel instead of vtkRenderWindow(). I
> have tryed deleting the 'edgeActor' as following :
> panel.getRenderer().getActor().getLastActor().vtkDelet();
> Here I'm sure that edgeActor is the lastActor.
>
> I also tryed setMapper(null). But it doesn't seem to work.
> Do any one have suggestion for me ?? I'm really stack here ...



More information about the vtkusers mailing list