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

Martijn de Greef m.d.greef at gmail.com
Tue Aug 16 04:37:20 EDT 2011


Just a small addition (you would probably figure yourself as well):

std::vector<vtkPlaneSource> planeList;

should be:

std::vector<vtkPlaneSource*> planeList;

Martijn

2011/8/15 Jothy <jothybasu at gmail.com>

> 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
>>
>
>
> _______________________________________________
> 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/20110816/f61c4cca/attachment.htm>


More information about the vtkusers mailing list