Dear all,<br><br>I&#39;m using a vtkVertexGlyphFilter objects to represent few points. The coordinates of these points are supposed to change as certain parameter changes. That means I have to clean the screen and re-draw these points every time the parameter changes. I used the following function to do the refreshing. <br>
<br>void ReDrawPoints(float current_mode[][3])<br>{<br>    float t[3];<br><br>    points = vtkPoints::New();<br>    for (int i = 0; i &lt; 5090; i++)<br>    {<br>        t[0] = current_mode[i][0];<br>        t[1] = current_mode[i][1];<br>
        t[2] = current_mode[i][2];<br>        points-&gt;InsertPoint(vtkIdType(i), t);<br>    }<br><br>    polydata = vtkPolyData::New();<br>    polydata-&gt;SetPoints(points);<br><br>    gf = vtkVertexGlyphFilter::New();<br>
    gf-&gt;AddInput(newpolydata);<br>    gf-&gt;Update();<br><br>    array = vtkFloatArray::New();<br>    for (int i = 0; i &lt; 5090; i++)<br>    {<br>        newarray-&gt;InsertTuple1(i, float(i));<br>    }<br><br>    polydata = vtkPolyData::New();<br>
    polydata-&gt;GetPointData()-&gt;SetScalars(array);<br><br>    mapper = vtkPolyDataMapper::New();<br>    mapper-&gt;SetInputConnection(gf-&gt;GetOutputPort());<br><br>    actor = vtkActor::New();<br>    actor-&gt;SetMapper(mapper);<br>
<br>    renderer-&gt;AddActor(actor);<br>    renWin-&gt;AddRenderer(renderer);<br><br>    ren-&gt;Render();<br>    iren-&gt;SetRenderWindow(renWin);<br>    renWin-&gt;Render();<br>    <br>
    gf-&gt;RemoveAllInputs();<br>    gf-&gt;Delete();<br>    points-&gt;Delete();<br>    polydata-&gt;Delete();<br>    array-&gt;Delete();<br>    mapper-&gt;Delete();<br>    actor-&gt;Delete();<br>    renderer-&gt;RemoveActor(actor);    //This one erase the points from the screen.<br>
}<br><br>This function is being called all the times until some condition is fulfilled.<br><br>However, it only cleans the screen. The points just show up on the screen for a flash and gone.<br><br>Can anyone help me out of this? I&#39;ll be extremely grateful.<br>
<br>Yours<br>Long<br>