<html><div style='background-color:'><P>It tries:</P>
<DIV>
<DIV class=RTE>
<P>Into the class constructor:<BR> ---------------------------------</P>
<P> // Qt-vtk interact <BR> ren = vtkRenderer::New();<BR> ui.vtkWidget->GetRenderWindow()->AddRenderer(ren); <BR> </P>
<P> Into the your function:<BR> -------------------------------</P>
<P> ..... </P>
<P> // Geometry ....</P>
<P> // Mapper .... </P>
<P> // Actor in scene<BR> vtkActor *actor = vtkActor::New();<BR> actor->SetMapper(mapper);<BR> actor->AddPosition(0,0,0);<BR> <BR> // Add Actor to renderer<BR> ren->AddActor(actor);<BR> <BR> // Set Actor properties ...<BR> </P>
<P> // Reset camera<BR> ren->ResetCamera();</P>
<P> <STRONG>// Widget refresh<BR> ren->GetRenderWindow()->Render();<BR></STRONG><BR></P>
<DIV id=result_box dir=ltr>Good luck,</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr> Paulo Jóia Filho </DIV>
<P> </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: <I>"Anders Sandholm" <anders.sandholm@gmail.com></I><BR>To: <I>vtkusers@vtk.org</I><BR>Subject: <I>[vtkusers] update the scene</I><BR>Date: <I>Wed, 8 Aug 2007 10:38:21 +0200</I><BR>>Hi<BR>><BR>>I have ran into a problem,<BR>><BR>>I set up the vtk window like:<BR>><BR>> renwin = vtkRenderWindow::New();<BR>> ui.vtkWindow->SetRenderWindow(renwin);<BR>> renwin->Delete();<BR>> renwin = NULL;<BR>><BR>> ren1 = vtkRenderer::New();<BR>><BR>> aCamera = vtkCamera::New();<BR>> aCamera->SetViewUp (0, 0, 1);<BR>> aCamera->SetPosition (0, 1, 0);<BR>> aCamera->SetFocalPoint (0, 0, 0);<BR>> ren1->SetActiveCamera(aCamera);<BR>> ren1->ResetCamera();<BR>> aCamera->Dolly(0.0);<BR>> ren1->SetBackground(.2,.2,.2);<BR>><BR>>
ui.vtkWindow->GetRenderWindow()->AddRenderer(ren1);<BR>><BR>>where ui is my GUI window containing a QVTKWidget<BR>><BR>>now what I want to do is add actors, so i do like<BR>><BR>>ren1->AddActor(myActor);<BR>><BR>>but now I ran into problem, I cant find a function to update/render my<BR>>actor. So my questions are<BR>>1; am i doing this right, can I do it like this?<BR>>2; how do I update the scene after I have added an actor?<BR>><BR>>regards<BR>>Anders<BR>>_______________________________________________<BR>>This is the private VTK discussion list.<BR>>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>>Follow this link to subscribe/unsubscribe:<BR>>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>