vtkPicker..

Patric.Weis at mycrona.de Patric.Weis at mycrona.de
Tue Mar 14 04:55:10 EST 2000


Hi K.R.

You only have to call vtkActor::Delete() once. Normally this is done in the
context where you created the actor by vtkActor::New() and after(!) having
assigned it to another vtk object (like the renderer by
vtkRenderer::AddActor()). The actor is only marked(!) to be deleted by vtk
as soon as possible. So long as other vtk objects (like the renderer) need
the actor, it never will be deleted and its pointer will be valid. By means
of the reference count concept vtk does this job for us. So we only have to
mark the actors as to be deleted and we don't need to take care of when
this is allowed to be done.

In your case the actors of the collection do not need to be deleted
specially, provided that you called vtkActor::Delete() in the creation
context of the actors. If not so, you have to delete them when you are done
with the pick operation. But be aware that they will still be valid until
you remove them by vtkRenderer::RemoveActor() and no other vtk object
exists that referenced them.


Patric Weis
MYCRONA GmbH


- - - Original Message - - -



                                                                                                                                          
                    "K.R.Subramanian"                                                                                                     
                    <krs at zappa.uncc.edu>           An:     VTK HELP <vtkusers at public.kitware.com>                                         
                    Gesendet von:                  Kopie:                                                                                 
                    owner-vtkusers at public.k        Thema:  vtkPicker..                                                                    
                    itware.com                                                                                                            
                                                                                                                                          
                                                                                                                                          
                    14.03.00 00:48                                                                                                        
                                                                                                                                          
                                                                                                                                          




When you use vtkPicker, it returns a collection of actors after the pick
operation.  As a result,
is the reference count incremented for each actor? I am trying to figure
out if I can
delete the actors once I am done with the pick operation.


Thanks.


    -- krs
--
K.R.Subramanian                           Phone: (704) 547-4872
Department of Computer Science            FAX:   (704) 547-3516
UNC Charlotte, 228A Kennedy
9201 Univ. City Blvd.                     Email: krs at cs.uncc.edu
Charlotte, NC 28223-0001                  WWW: http://www.cs.uncc.edu/~krs










--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list