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

Method InsertComponent

Common/Core/vtkDataArray.cxx:220–240  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

218
219//------------------------------------------------------------------------------
220void vtkDataArray::InsertComponent(vtkIdType tupleIdx, int compIdx, double value)
221{
222 double* tuple = new double[this->NumberOfComponents];
223
224 if (tupleIdx < this->GetNumberOfTuples())
225 {
226 this->GetTuple(tupleIdx, tuple);
227 }
228 else
229 {
230 for (int k = 0; k < this->NumberOfComponents; k++)
231 {
232 tuple[k] = 0.0;
233 }
234 }
235
236 tuple[compIdx] = value;
237 this->InsertTuple(tupleIdx, tuple);
238
239 delete[] tuple;
240}
241
242//------------------------------------------------------------------------------
243void vtkDataArray::GetData(

Callers 2

InterpolateTupleMethod · 0.95
InterpolateTupleMethod · 0.95

Calls 3

InsertTupleMethod · 0.95
GetNumberOfTuplesMethod · 0.45
GetTupleMethod · 0.45

Tested by

no test coverage detected