[vtkusers] set data in vtkPolyData

Dominik Szczerba domi at vision.ee.ethz.ch
Sat Jul 8 15:17:20 EDT 2006


How do I go about constructung a vtkPolyData object without copying
vertex/face data (I have my vertices in a double* array and faces in
int* already). In specific, how is the vtkPoints::Data organized, x,y,z
triplets or x0,x1,...xn-1,y0,y1..,z0,z1...? I want to use
vtkPoints::SetData, it takes vtkDataArray where I can use SetArray
successfuly, but I get a crash so I guess I pass vertex data wrongly.

I managed to get down to:

  void InsertTupleValue(vtkIdType i, const double* tuple)
    { this->RealSuperclass::InsertTupleValue(i, tuple); }

but dont understand the code from here.
Thanks for any hints,
Dominik

-- 
Dominik Szczerba, Dr.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list