[vtkusers] fast visualization of polygons
Prof. Andreas Gerber
gerber at fh-biberach.de
Wed Jan 23 09:25:06 EST 2002
Sorry, I was not precise enough. Slow means interaction e.g. rotating and
zooming. I have build an example with 2.500 cubes using vtkCubeSource which
seems to be much faster despite of 6 quadrilaterals for each cube. I found
that not all polygons are planar. Does that matter?
Andreas
Am Mittwoch, 23. Januar 2002 14:32 schrieb Jeff Lee:
> A faster version would probably use vtkPolyData instead of
> vtkUnstructuredGrid. Also, I'm guessing that "slower" means building
> time, not rendering time. In that case, If you know the structure of
> your polygons (points, attributes, cell-types...) and if your data
> structures are right, you could set them in one step using
> vtkPolyData->SetPoints(...), vtkPolyData->SetLines(...),
> vtkPolyData->SetPolys(...). You can basically wrap vtk around your data
> (assuming the data is stored in a compacted array format). This
> basically bypasses the slower insert methods. Also, the method
> described below is about as slow as you can get - using an append
> filter. You could just use vtkPolyData's InsertNextCell() method. If
> your requirement is to add cells one at a time, then GL has the least
> overhead.
> -Jeff
>
More information about the vtkusers
mailing list