[vtkusers] traversing a vtkPolyData
    Kent Eschenberg 
    eschenbe at psc.edu
       
    Mon Aug  6 14:22:40 EDT 2007
    
    
  
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
    
    
More information about the vtkusers
mailing list