----------------------------------------------------------------------------
| 395 | |
| 396 | //---------------------------------------------------------------------------- |
| 397 | void vtkPVArrayInformation::CopyFromCellAttribute(vtkCellGrid* grid, vtkCellAttribute* attribute) |
| 398 | { |
| 399 | assert(!!attribute); |
| 400 | const int numComponents = attribute->GetNumberOfComponents(); |
| 401 | assert(numComponents > 0); |
| 402 | |
| 403 | this->Name = attribute->GetName().Data(); |
| 404 | this->DataType = VTK_DOUBLE; // TODO: vtkCellAttribute doesn't force this. |
| 405 | // this->NumberOfTuples = 0; // TODO: Should we even try to answer this? |
| 406 | |
| 407 | this->Components.resize(numComponents + 1); |
| 408 | for (int comp = -1; comp < numComponents; ++comp) |
| 409 | { |
| 410 | auto& compInfo = this->Components.at(comp + 1); |
| 411 | grid->GetCellAttributeRange(attribute, comp < 0 ? -2 : comp, compInfo.Range.GetData(), false); |
| 412 | grid->GetCellAttributeRange( |
| 413 | attribute, comp < 0 ? -2 : comp, compInfo.FiniteRange.GetData(), true); |
| 414 | compInfo.DefaultName = vtkPVPostFilter::DefaultComponentName(comp, numComponents); |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | //---------------------------------------------------------------------------- |
| 419 | void vtkPVArrayInformation::CopyFromGenericAttribute(vtkGenericAttribute* array) |
no test coverage detected