[vtkusers] multi-objects in VTK; loop-Problem

Jothy jothybasu at gmail.com
Mon Aug 15 08:57:06 EDT 2011


I feel it would be better to use std::vector<vtkPlaneSource>planes.

Then create a plane and add to the vector using push_back.

HTH

Jothy

On Mon, Aug 15, 2011 at 1:47 PM, Fabian <fabian-richter at gmx.de> wrote:

> Hi,
>
> yes I tried. But the line
>
> vtkPlaneSource *plane[i] = vtkPlaneSource::New();
>
> caused trouble.
>
> This is a part of the code:
>
> int main()
> {
>        int plane[500];
>
>        int i;
>         for (i = 0; i < 499; ++i)
>        {
>          plane[i]=i+1;
>          vtkPlaneSource *plane[i] = vtkPlaneSource::New();
>        }
>  system("PAUSE"); //Just a check for me
> return 0;
> }
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4700838.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110815/77a47f90/attachment.htm>


More information about the vtkusers mailing list