[vtk-developers] Why wasn't vtkCellArray in vtkPolyData designed similar to vtkCellLinks?

David E DeMarle dave.demarle at kitware.com
Fri Feb 10 08:28:59 EST 2012


Because iteration is the more common access pattern (most importantly
when pushing the elements to GL). Thus making the primary structure a
sequential layout and making the random access layout optional saves
both time and memory.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909



On Thu, Feb 9, 2012 at 7:26 PM, Mingcheng Chen <linyufly at gmail.com> wrote:
> Hi all,
>
> Currently, without vtkCellTypes we cannot randomly access cell in poly data
> because there is no uniform "entry length" in vtkCellArray (cells may have
> different number of connectivities).
>
> However, vtkCellLinks can support random access for every point, because it
> uses local linked list in each entry.
>
> Why wasn't vtkCellArray designed like vtkCellLinks? If so, we can deal with
> only three arrays instead of four.
>
> Could anyone please help me with that puzzle? What is the advantage of the
> current design?
>
> Thanks!
>
> Best regards,
> Mingcheng Chen
> February 9th, 2012
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list