------------------------------------------------------------------------------
| 443 | |
| 444 | //------------------------------------------------------------------------------ |
| 445 | void vtkBitArray::InsertTuplesStartingAt( |
| 446 | vtkIdType dstStart, vtkIdList* srcIds, vtkAbstractArray* source) |
| 447 | { |
| 448 | vtkBitArray* ba = vtkArrayDownCast<vtkBitArray>(source); |
| 449 | if (!ba) |
| 450 | { |
| 451 | vtkWarningMacro("Input and output arrays types do not match."); |
| 452 | return; |
| 453 | } |
| 454 | |
| 455 | if (ba->NumberOfComponents != this->NumberOfComponents) |
| 456 | { |
| 457 | vtkWarningMacro("Number of components do not match."); |
| 458 | return; |
| 459 | } |
| 460 | |
| 461 | vtkIdType previousMaxId = this->MaxId; |
| 462 | for (vtkIdType idIndex = 0; idIndex < srcIds->GetNumberOfIds(); ++idIndex) |
| 463 | { |
| 464 | vtkIdType numComp = this->NumberOfComponents; |
| 465 | vtkIdType srcLoc = srcIds->GetId(idIndex) * this->NumberOfComponents; |
| 466 | vtkIdType dstLoc = (dstStart + idIndex) * this->NumberOfComponents; |
| 467 | while (numComp-- > 0) |
| 468 | { |
| 469 | this->InsertValue(dstLoc++, ba->GetValue(srcLoc++)); |
| 470 | } |
| 471 | } |
| 472 | if (previousMaxId / 8 != this->MaxId / 8) |
| 473 | { |
| 474 | this->InitializeUnusedBitsInLastByte(); |
| 475 | } |
| 476 | this->DataChanged(); |
| 477 | } |
| 478 | |
| 479 | //------------------------------------------------------------------------------ |
| 480 | void vtkBitArray::InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) |
no test coverage detected