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

Method InsertNextTuple

Common/Core/vtkBitArray.cxx:568–584  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Insert the jth tuple in the source array, at the end in this array. Note that memory allocation is performed as necessary to hold the data. Returns the location at which the data was inserted.

Source from the content-addressed store, hash-verified

566// Note that memory allocation is performed as necessary to hold the data.
567// Returns the location at which the data was inserted.
568vtkIdType vtkBitArray::InsertNextTuple(vtkIdType j, vtkAbstractArray* source)
569{
570 vtkBitArray* ba = vtkArrayDownCast<vtkBitArray>(source);
571 if (!ba)
572 {
573 vtkWarningMacro("Input and output arrays types do not match.");
574 return -1;
575 }
576
577 vtkIdType locj = j * ba->GetNumberOfComponents();
578 for (vtkIdType cur = 0; cur < this->NumberOfComponents; cur++)
579 {
580 this->InsertNextValue(ba->GetValue(locj + cur));
581 }
582 this->DataChanged();
583 return (this->GetNumberOfTuples() - 1);
584}
585
586//------------------------------------------------------------------------------
587// Get a pointer to a tuple at the ith location. This is a dangerous method

Callers 15

RequestDataMethod · 0.45
RequestDataMethod · 0.45
ReadValueMethod · 0.45
InsertCellsToGridMethod · 0.45
MakeBoundaryMeshMethod · 0.45
WriteVTPMethod · 0.45
ReadMoleculeMethod · 0.45
SplitTileTextureMethod · 0.45
FillFieldArrayValuesFunction · 0.45
TestSOAPointsFunction · 0.45

Calls 5

InsertNextValueMethod · 0.95
DataChangedMethod · 0.95
GetNumberOfComponentsMethod · 0.45
GetValueMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by 11

TestSOAPointsFunction · 0.36
testBufferSharedMethod · 0.36
testArrayMethod · 0.36
benchmarkFunction · 0.36
TestVariantArrayFunction · 0.36
TestReflectionFilterFunction · 0.36
TestLagrangianParticleFunction · 0.36
RequestDataMethod · 0.36
InitializePolyDataFunction · 0.36