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

Jothy jothybasu at gmail.com
Mon Aug 15 09:28:03 EDT 2011


It's simple

#include<vector>

std::vector<vtkPlaneSource>planeList;

for(i=0;i<10;i++)
{

vtkPlaneSource *plane=vtkPlaneSource::New();
//Do whatever you want
planeList.push_back(plane);

}

If you want to acess the plane, you could do it by

planeList[i]->GetOrigin();//For instance

Neither I am a c++ expert, just started a copule of months ago!

HTH

Jothy



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

> Thank You for your ideas!
>
> But *ashamed* I dont know how to do implement this or how to use push back
> :((
>
> I searched for some hints on the web but didnt find fast help.
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/multi-objects-in-VTK-loop-Problem-tp4700582p4700989.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/266c1973/attachment.htm>


More information about the vtkusers mailing list