[vtkusers] Getting a float OR double array

Darshan Pai darshanpai at gmail.com
Mon Aug 23 13:37:16 EDT 2010


yeah looks like it works . I just assumed it was only a prototype :)

On Sun, Aug 22, 2010 at 4:34 PM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:

> On Sun, Aug 22, 2010 at 1:43 PM, Darshan Pai <darshanpai at gmail.com> wrote:
>
>> I don't know why GetTuple is pure virtual in vtkDataArray . Though yeah I
>> agree it should theoretically work the same way .
>>
>> Darshan
>>
>
>
> I saw that there is vtkDataArray::GetTuple(vtkIdType, double*) that is
> implemented from vtkDataArrayTemplate:
>
>   vtkDataArray* dataNormals =
>
>  vtkDataArray::SafeDownCast(polyDataNormals->GetOutput()->GetPointData()->GetNormals());
>
>   double dataN[3];
>   dataNormals->GetTuple(0,dataN);
>
> This seems to do exactly what we want.
>
> Thanks,
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100823/dd510aed/attachment.htm>


More information about the vtkusers mailing list