[vtk-developers] Why is GetRange double* even for non double arrays?
David Doria
daviddoria+vtk at gmail.com
Mon May 17 09:32:29 EDT 2010
> Don't forget the other signature, which cannot you cannot override
> with a different type:
>
> double *GetRange();
>
> It's reasonable to provide a method such as the one that you ask for,
> but only if the method name is changed. So vtkIntArray would have the
> following methods added:
>
> void GetValueRange(int range[2]);
> double *GetValueRange();
>
> Ditto for the other arrays.
>
> David
>
I don't understand what you mean about the other signature?
So there could be something like this:
void GetValueRange(int range[2])
{
double r[2];
this->GetRange(r);
range[0] = static_cast<int>(r[0]);
range[1] = static_cast<int>(r[1]);
}
But why would we have to also provide this:
double *GetValueRange();
?
It seems like this is just continuing the same problem of providing a
double* accessor to int data?
David
More information about the vtk-developers
mailing list