MCPcopy Create free account
hub / github.com/Kitware/VTK / InsertTuplesStartingAt

Method InsertTuplesStartingAt

Common/Core/vtkBitArray.cxx:445–477  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

443
444//------------------------------------------------------------------------------
445void 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//------------------------------------------------------------------------------
480void vtkBitArray::InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source)

Callers 12

RemoveGhostCellsMethod · 0.45
operator()Method · 0.45
CopyDataMethod · 0.45
RemoveGhostCellsMethod · 0.45
CastRaysMethod · 0.45
ExtractSelectedTuplesMethod · 0.45
FinalizeMethod · 0.45
ExecuteMethod · 0.45
FinalizeMethod · 0.45
DoProbingMethod · 0.45
DoProbingMethod · 0.45
DartThrowerFunction · 0.45

Calls 6

InsertValueMethod · 0.95
DataChangedMethod · 0.95
GetNumberOfIdsMethod · 0.45
GetIdMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected