[vtkusers] keeping track on actors, is this stupid?

Nico Vermaas vermaas at astron.nl
Fri Jul 25 10:05:03 EDT 2003


I am visualising a (radio)astronomical data cube full of noice and with some signal. In a seperate window I have a slice of that cube and in another window a line plot from that slice.
Then some visual clues about the cursor (lines), axis along the data and annotation for the cursor and the axes. 

At this moment I have 35 actors of various kinds (3d, 2d, followers, axes). Do you have a similar problem? How do you handle the actors, do you define them in the memberfunctions right at the point where you need them or also on a higher level?

>>> "Bob Palank" <bob at stlcc.org> 07/25/03 13:49 PM >>>
I'm curious, about how many actors do you have, and what are you
visualizing?
BR
 Bob Palank
 St. Louis, MO, USA

-----Original Message-----
From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org]On Behalf Of
Nico Vermaas
Sent: Friday, July 25, 2003 1:53 AM
To: vtkusers at vtk.org
Subject: [vtkusers] keeping track on actors, is this stupid?


Hi,
I had some trouble keeping track on all the actors.

I have tons of actors for text, lines, cubes, axies, etc. Some of them need
to be updated (like a cursor annotation). For example every time a pick
event occurs.

In my (member)functions I use 'addActor' every time, but when I have just
created that actor in that function (with New()) I must first delete it,
otherwise I just get an extra prop in the scene next to the old one. To be
able to delete the right actor I had to keep track of all of them and that's
a nuicance.

So what I did is defining all the actors as members and create them all at
once in the contructor (and delete them in the destructor). When I now use
AddActor the Prop in the screen gets updated nicely and the NumberOfActors
does not increase.

The only negative side I see is that my memberfunctions are less independant
because they use these members which are global in the class.

Is this a valid way of handling the actors or is this stupid? Any idea's
about this?

Nico

_______________________________________________
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