[vtkusers] array of actors?

Alex Lear alear at cns.montana.edu
Tue Jul 30 15:45:02 EDT 2002


Csaba,
This will give you an array of "k" actors:

//*****
vtkActor *MyArrayOfActors[k];
for(i=0;i<k,i++)
    {
    MyArrayOfActors[i] = vtkActor::New();
    }
//*****

You can then address any of the actors by indexing them.  Sounds like you
need an array of actors for each layer or a 2d array.  For 2d array, just
change the above example to 2d instead of 1d.

-Alex Lear



  ----- Original Message -----
  From: Csaba Palotai
  To: vtkusers at public.kitware.com
  Sent: Tuesday, July 30, 2002 12:54 PM
  Subject: [vtkusers] array of actors?


  Hiya all,

  i'm still just learning C++ and vtk so my question may be dummy, sorry in
that case...
  I need to creat multiple layers to my image and the way to it is adding
all the actors to the renderer.
  However, the number of layers is varying, depending on the CFD model data,
I have k number of layers.
  Is it possible to create an array of vtkActors for k elements and if so
how?
  Has anyone had any experience with something like this?

  All ideas appreciated
  Thanks
  Csaba

  ***************
  Csaba Palotai

  Research Assistant

  Comparative Planetology Laboratory
  104 Sackett Hall, University of Louisville
  Louisville, KY 40292

  phone: (502) 852-3927 email: csaba.palotai at louisville.edu
  fax: (502) 852-6053 URL:www.louisville.edu/research/cpl







More information about the vtkusers mailing list