[vtkusers] Help with vtkActorCollection (correction !!!)

Chris Volpe cvolpe at ara.com
Wed Jul 23 10:21:00 EDT 2003


Correct. You were creating an actor collection and then setting a
variable, of the same name, to refer to an already-existing actor
collection. So, in addition to adding the dollar sign in "$allActors
initTraversal", you should also remove the line "vtkActorCollection
allActors" since it creates an instance that you never use, and is
therefore superfluous.

--
Christopher R. Volpe, Ph.D.

Senior Scientist                         Email: cvolpe at ara.com
Applied Research Associates, Inc.          Voice: 919-582-3380
8540 Colonnade Center Dr., Ste 301           Fax: 919-878-3672

Raleigh, NC 27615                             Web: www.ara.com

 
> -----Original Message-----
> From: Johanna [mailto:pettersson.johanna at home.se]
> Sent: Wednesday, July 23, 2003 9:06 AM
> To: nexgen at poczta.onet.pl
> Cc: vtkUsers at vtk.org
> Subject: Re: Re: [vtkusers] Help with vtkActorCollection (correction
!!!)
> 
> Thank you very much for helping me out...
> 
> I found the error I think. I had to write
>    $allActors initTraversal
> and not
>     allActors initTraversal
> 
> I am not used to write in tcl either. I normally use c++. But by
changing
> this line it seems to work with both vtkActorCollection and
> vtkPropCollection...
> 
> Johanna
> 
> -----Original Message-----
> From: "michal strzelecki" <nexgen at poczta.onet.pl>
> To: <vtkUsers at vtk.org>
> Date: Wed, 23 Jul 2003 14:03:30 +0200
> Subject: Re: [vtkusers] Help with vtkActorCollection (correction !!!)
> 
> > Hi,
> >
> > I tried to use vtkPropCollection instead, and 'ren getProps', but
> > unfortunately it made no difference. 'allActors GetNumberOfItems'
still
> > generates a 0.
> >
> > Can the error be somewhere else?
> >
> > Johanna
> >
> >
>  I workin in c++ and I don't know tcl, but try this:
>  only:
>  set allActors [ren1 GetActors]
>  //or
>  set allActors [ren1 GetProps]
>  $allActors GetNumberOfItems
> 
>  Do not use
>  vtkActorCollection allActors
>  because you in this way create a new actorcollection instead of
create
> only
>  a pointer
> 
> michal
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list