<div dir="ltr">On Wed, Mar 20, 2013 at 7:35 PM, Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Actually, now I remember having a discussion with Will where he explained the reasoning behind this design. In vtkPolyData the locations array is created only as needed. In rendering, all a mapper needs to do is to iterate over triangles or polygons to render them. The vtkCellArray structure is a good fit for this. Without needing locations. vtkUnstructuredGrid adds the locations array to provide random access to vtkCellArray.<div>



<br></div><div>Given this particular use case, maybe we should consider splitting the implementation of cell arrays for polydata and unstructured grids? This would allow for separate optimized implementations to address each data object's needs.</div>



<div><br></div><div>PS: I get the feeling that this discussion is going to get out of hand pretty quickly since redesigning these data structures requires a lot of thought. As much as I enjoy a good discussion on data structures, I am not sure that we are prepared to go this deep in changing core data structures in VTK right now.</div>

</div></blockquote><div><br></div><div style>Sure, let's keep this from getting out of hand, but see if any good ideas pop out from a quick discussion :-)</div><div style><br></div><div style>Dave</div></div></div></div>