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

Method SetTuple

Common/Core/vtkDataArray_SetTuple_array.cxx:36–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34} // end anon namespace
35
36VTK_ABI_NAMESPACE_BEGIN
37//------------------------------------------------------------------------------
38void vtkDataArray::SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray* source)
39{
40 vtkDataArray* srcDA = vtkDataArray::FastDownCast(source);
41 if (!srcDA)
42 {
43 vtkErrorMacro(
44 "Source array must be a vtkDataArray subclass (got " << source->GetClassName() << ").");
45 return;
46 }
47
48 if (source->GetNumberOfComponents() != this->GetNumberOfComponents())
49 {
50 vtkErrorMacro("Number of components do not match: Source: "
51 << source->GetNumberOfComponents() << " Dest: " << this->GetNumberOfComponents());
52 return;
53 }
54
55 SetTupleArrayWorker worker(srcTupleIdx, dstTupleIdx);
56 if (!vtkArrayDispatch::Dispatch2::Execute(srcDA, this, worker))
57 {
58 worker(srcDA, this);
59 }
60}
61VTK_ABI_NAMESPACE_END

Callers

nothing calls this directly

Calls 4

FastDownCastFunction · 0.70
ExecuteFunction · 0.50
GetClassNameMethod · 0.45
GetNumberOfComponentsMethod · 0.45

Tested by

no test coverage detected