[vtkusers] declaring array of vtkCubeSources in c++?

Galen Wilkerson galen at compbio.washington.edu
Mon Jan 27 18:47:12 EST 2003


Anyone know how to do this in a g++ environment?

I tried this, but gives errors.

  vtkCubeSource cube[20];

  for (int i = 0; i < 20; i++) {
    cube[i] = vtkCubeSource::New();
    cube[i].SetXLength(0.02);
    cube[i].SetYLength(0.02);
    cube[i].SetZLength(0.02);
    
    cube[i].SetCenter (float(i), float(i), float(i));
  }


thanks,

-Galen

Computational Biology Research Group
http://compbio.washington.edu/
phone: 206 732 6127
fax: 206 732 6055




More information about the vtkusers mailing list