<div class="gmail_quote">On Sun, Dec 6, 2009 at 8:22 PM, Marcus Thamson <span dir="ltr"><<a href="mailto:markie_thomson@yahoo.de">markie_thomson@yahoo.de</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;">
<table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
Hi All,<br><br>I am trying to render multiple surfaces in one render window using VTK with C++.<br><br>So, I would like to take my working single surface code (vtkPolyData, vtkPolyDataMapper, vtkActor, vtkRenderer, ...), and use an dynamic arrays of pointers instead, with "Renderer->AddActor(Actors[i_surf])" in a for loop.<br>
<br>However, I am having some problems initialising dynamic arrays of pointers to vtkPolyData, etc.<br>My fumbling attempts with double pointers (e.g. "vtkPolyData **surfs") have not worked.<br><br>Could someone please provide an example of how to do this? (or put me on the right track if this direction is not good practice)<br>
<br>(Admittedly, this is more of a question about C/C++ programming...sorry - I couldn't find any generic examples to work with).<br><br>Many thanks,
MT<br></td></tr></tbody></table><div class="hm"><br><br></div></blockquote><br><div>Can you use a std::vector instead of a **? Is this what you are looking to do?<br><a href="http://www.vtk.org/Wiki/VTK_Examples_Multiple_Actors_Vector">http://www.vtk.org/Wiki/VTK_Examples_Multiple_Actors_Vector</a><br>
<div class="hm"><br>If not, can you clarify?<br><br>Thanks,<br><br>David<br>
</div></div></div>