[vtk-developers] vtkAOSDataArrayTemplate annoying API change
David Gobbi
david.gobbi at gmail.com
Thu Mar 24 12:13:20 EDT 2016
On Thu, Mar 24, 2016 at 10:00 AM, David Lonie <david.lonie at kitware.com>
wrote:
>
> GetValue is not defined at the vtkDataArray level, and nor should it be
> (IMO).
>
> My reasoning: vtkDataArray no longer assumes AOS ordering. The decision
> was that, ideally, vtkDataArray API would operate on tuples and components,
> while subclasses (e.g. AOS or SOA) would provide these more
> implementation-dependent lookups. In the context of SOA ordering, the value
> indices don't make a whole lot of sense and are inefficient to use, while
> GetComponentValue is efficient in either case.
>
That makes sense, thanks for the explanation. It's obvious to me now that
you cannot provide a "flat" view of the data until the ordering is known.
I would really like GetNumberOfValues() to make a comeback.
>>
>
> I agree -- so much so that I already added it! ;) It's not gone, it's just
> moved out of the implementation class to vtkAbstractArray.
>
Nice!
- David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160324/23a11281/attachment-0001.html>
More information about the vtk-developers
mailing list