[vtkusers] traversing a vtkPolyData

Luca Pamparana luca.pamparana at gmail.com
Tue Aug 7 05:06:00 EDT 2007


That is what I needed!

Thanks Kent :)

On 8/6/07, Kent Eschenberg <eschenbe at psc.edu> wrote:
>
> Luca Pamparana wrote:
> > vtkPolyData * out = cutter->GetOutput();
> > Now what I want to do is traverse this output and get all the vertices
> of
> > all the polygons in this vtkPolyData.
>
> From the online documentation it looks like you would want this:
>
> vtkCellArray* CA=out->GetPolys();
> CA->InitTraversal();
> vtkIdType npts;
> vtkIdType *pts;
> while( CA->GetNextCell(npts,pts) ) {
> // do something with pts
> }
>
> Kent
> Pittsburgh Supercomputing Center
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070807/fb2b7d42/attachment.htm>


More information about the vtkusers mailing list