[vtkusers] Initialising arrays of pointers to vtkPolyData, etc.

David Doria daviddoria+vtk at gmail.com
Sun Dec 6 21:12:04 EST 2009


On Sun, Dec 6, 2009 at 8:22 PM, Marcus Thamson <markie_thomson at yahoo.de>wrote:

> Hi All,
>
> I am trying to render multiple surfaces in one render window using VTK with
> C++.
>
> 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.
>
> However, I am having some problems initialising dynamic arrays of pointers
> to vtkPolyData, etc.
> My fumbling attempts with double pointers (e.g. "vtkPolyData **surfs") have
> not worked.
>
> 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)
>
> (Admittedly, this is more of a question about C/C++ programming...sorry - I
> couldn't find any generic examples to work with).
>
> Many thanks, MT
>
>
>
Can you use a std::vector instead of a **? Is this what you are looking to
do?
http://www.vtk.org/Wiki/VTK_Examples_Multiple_Actors_Vector

If not, can you clarify?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091206/7b50418d/attachment.htm>


More information about the vtkusers mailing list