[vtkusers] vtkActorCollection how this works?

Giancarlo Amati ilferraresebono at hotmail.it
Mon Mar 30 12:28:10 EDT 2009


many thanks....that was the problem, although I can recover each actor now, I don't see any effect in applying a matrix transformation using the vtkTransformFilter...to each dataset linked to the actor...that's weird.

GC>

> Date: Mon, 30 Mar 2009 12:14:29 -0400
> From: francois.bertel at kitware.com
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] vtkActorCollection how this works?
> 
> Did you use InitTraversal()?
> 
> Typically, iterating over a vtkCollection should look like that:
> 
> 
> vtkCollection *c;
> vtkObject *o;
> 
> c->InitTraversal();
> o=c->GetNextItem();
> while(o!=0)
>   {
>   // process o
>   // ...
> 
>   // next step
>   o=c->GetNextItem();
>   }
> 
> 
> On Mon, Mar 30, 2009 at 12:03 PM, Giancarlo Amati
> <ilferraresebono at hotmail.it> wrote:
> > Hello everybody,
> >
> > I'm using the class vtkPIcker to pick an object in the scene. From the class
> > picker I'm getting the vtkActorCollection using picker->GetActors()....
> > and so I use
> >
> > vtkActor *act = vtkActor::New();
> >
> >
> > act = actColl->GetNextItem();
> >
> > to access the list of the actors but  the pointer I get back is NULL,  while
> > if I use pick->GetActor (without the final S) I get the pointer to the
> > actor.
> > I want to apply a transformation to the sselected actor so...what's the
> > problem with the collection?
> >
> > Kind Regards.
> > Giancarlo
> >
> > ________________________________
> > Scopri tutte le novità. Scarica Messenger 2009!
> > _______________________________________________
> > 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
> >
> >
> 
> 
> 
> -- 
> François Bertel, PhD  | Kitware Inc. Suite 204
> 1 (518) 371 3971 x113 | 28 Corporate Drive
>                       | Clifton Park NY 12065, USA
> _______________________________________________
> 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

_________________________________________________________________
Portati avanti: scarica Messenger 2009!
http://clk.atdmt.com/GBL/go/136430507/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090330/f5f1b1b9/attachment.htm>


More information about the vtkusers mailing list