[vtk-developers] vtkDataArray::GetTuple behavior

David C. Thompson dcthomp at sandia.gov
Wed Jun 2 17:28:27 EDT 2004


	I was looking at vtkDataArray.cxx and noticed this implementation of

// default double behaviour
void vtkDataArray::GetTuple(vtkIdType i, double * tuple)
  int c;
  int numComp=this->GetNumberOfComponents();
  double *ftuple=new double[numComp];
  for (c = 0; c < numComp;  c++)
    tuple[c] = ftuple[c];
  delete [] ftuple;

In vtkDataArray.h, it looks like GetTuple(int,double*) is supposed to be
pure virtual. Upon further examination, it seems that the ftuple
variable used to be float* and that this bit of flotsam and jetsam got
created during the great float->double conversion of '03. Am I right,
and if so, should this whole function be removed from vtkDataArray.cxx?


More information about the vtk-developers mailing list