<html><div style='background-color:'><P>It tries:</P>
<DIV>
<DIV class=RTE>
<P>Into the class constructor:<BR>&nbsp;---------------------------------</P>
<P>&nbsp;&nbsp;// Qt-vtk interact&nbsp;&nbsp; <BR>&nbsp; ren = vtkRenderer::New();<BR>&nbsp; ui.vtkWidget-&gt;GetRenderWindow()-&gt;AddRenderer(ren);&nbsp;<BR>&nbsp;&nbsp;</P>
<P>&nbsp;Into the&nbsp;your function:<BR>&nbsp;-------------------------------</P>
<P>&nbsp;.....&nbsp;</P>
<P>&nbsp;&nbsp; // Geometry ....</P>
<P>&nbsp; // Mapper .... </P>
<P>&nbsp; // Actor in scene<BR>&nbsp; vtkActor *actor = vtkActor::New();<BR>&nbsp; actor-&gt;SetMapper(mapper);<BR>&nbsp; actor-&gt;AddPosition(0,0,0);<BR>&nbsp;<BR>&nbsp; // Add Actor to renderer<BR>&nbsp; ren-&gt;AddActor(actor);<BR>&nbsp;<BR>&nbsp; // Set Actor properties ...<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P>
<P>&nbsp; // Reset camera<BR>&nbsp; ren-&gt;ResetCamera();</P>
<P>&nbsp; <STRONG>// Widget refresh<BR>&nbsp; ren-&gt;GetRenderWindow()-&gt;Render();<BR></STRONG><BR></P>
<DIV id=result_box dir=ltr>Good luck,</DIV>
<DIV dir=ltr>&nbsp;</DIV>
<DIV dir=ltr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Paulo Jóia Filho&nbsp;</DIV>
<P>&nbsp;&nbsp; </P></DIV>
<DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>

<DIV></DIV>From:&nbsp;&nbsp;<I>"Anders Sandholm" &lt;anders.sandholm@gmail.com&gt;</I><BR>To:&nbsp;&nbsp;<I>vtkusers@vtk.org</I><BR>Subject:&nbsp;&nbsp;<I>[vtkusers] update the scene</I><BR>Date:&nbsp;&nbsp;<I>Wed, 8 Aug 2007 10:38:21 +0200</I><BR>&gt;Hi<BR>&gt;<BR>&gt;I have ran into a problem,<BR>&gt;<BR>&gt;I set up the vtk window like:<BR>&gt;<BR>&gt; renwin = vtkRenderWindow::New();<BR>&gt; ui.vtkWindow-&gt;SetRenderWindow(renwin);<BR>&gt; renwin-&gt;Delete();<BR>&gt; renwin = NULL;<BR>&gt;<BR>&gt; ren1 = vtkRenderer::New();<BR>&gt;<BR>&gt; aCamera = vtkCamera::New();<BR>&gt; aCamera-&gt;SetViewUp (0, 0, 1);<BR>&gt; aCamera-&gt;SetPosition (0, 1, 0);<BR>&gt; aCamera-&gt;SetFocalPoint (0, 0, 0);<BR>&gt; ren1-&gt;SetActiveCamera(aCamera);<BR>&gt; ren1-&gt;ResetCamera();<BR>&gt; aCamera-&gt;Dolly(0.0);<BR>&gt; ren1-&gt;SetBackground(.2,.2,.2);<BR>&gt;<BR>&gt; 
ui.vtkWindow-&gt;GetRenderWindow()-&gt;AddRenderer(ren1);<BR>&gt;<BR>&gt;where ui is my GUI window containing a QVTKWidget<BR>&gt;<BR>&gt;now what I want to do is add actors, so i do like<BR>&gt;<BR>&gt;ren1-&gt;AddActor(myActor);<BR>&gt;<BR>&gt;but now I ran into problem, I cant find a function to update/render my<BR>&gt;actor. So my questions are<BR>&gt;1; am i doing this right, can I do it like this?<BR>&gt;2; how do I update the scene after I have added an actor?<BR>&gt;<BR>&gt;regards<BR>&gt;Anders<BR>&gt;_______________________________________________<BR>&gt;This is the private VTK discussion list.<BR>&gt;Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>&gt;Follow this link to subscribe/unsubscribe:<BR>&gt;http://www.vtk.org/mailman/listinfo/vtkusers<BR></FONT></BLOCKQUOTE></DIV></div><br clear=all><hr>Inscreva-se no novo Windows Live Mail beta e 
seja um dos primeiros a testar as novidades. Saiba mais: <a href="http://g.msn.com/8HMABRBR/2728??PS=47575" target="_top">Saiba mais!</a> </html>