"act" is a pointer, and thus only a few bytes. The structure "act" refers to will not be duplicated by your keeping hold of the pointer.<br><br>You may also want to study reference counting, and then after that smartpointers. They are how VTK makes sure that as long as you want to keep your pointer, the structure on the other side of the pointer will still be valid.<br>
<br clear="all">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x109<br>
<br><br><div class="gmail_quote">On Fri, Feb 12, 2010 at 9:08 AM, Giancarlo Amati <span dir="ltr"><<a href="mailto:ilferraresebono@hotmail.it">ilferraresebono@hotmail.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
Hello VTkers,<br><br>let's say that I have this function<br><br><br>vtkRenderer *renderer = vtkRenderer::New();<br><br>void createScene(...) {<br><br>vtkActor *act = vtkActor::New();<br><br>renderer->AddActor();<br>
<br>}<br><br>I have the need of update an actor associated to a particular element of the scene. <br>The AddRenderer() adds the actor in the pipeline which I believe is an overall innner VTK datastructure. <br><br>So, I know that the GetActors() in the renderer returns the vtkActorsCollection. <br>
If I want to change/update something in a pre-allocated actor shall I save the variable act and the nperform a research in that collection returned by GetActors()? <br><br>But saving the variable *act in a global data structure wouldn't it mean duplicating information (and so more memory usage) about that actor? and If I modify *act, am I actually modifing the same in the pipeline?<br>
<br>Thanks a lot for any advice you can give me!.<br><font color="#888888"><br>Giancarlo<br>                                            </font><div class="hm"><br><hr>Troppe caselle di posta? <a href="http://www.windowslive.it/hotmail/GestisciAltriAccount.aspx" target="_blank">Gestiscile da Hotmail!</a></div>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>