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

Function GenerateArray

Testing/Core/Testing/Cxx/TestDataObjectCompare.cxx:119–133  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

117
118//------------------------------------------------------------------------------
119vtkNew<vtkDoubleArray> GenerateArray(vtkFieldData* fd, vtkIdType size, double firstValue)
120{
121 vtkNew<vtkDoubleArray> array;
122 array->SetName("Array");
123 array->SetNumberOfValues(size);
124 array->SetValue(0, firstValue);
125 for (vtkIdType id = 1; id < size; ++id)
126 {
127 array->SetValue(id, id);
128 }
129
130 fd->AddArray(array);
131
132 return array;
133}
134
135//------------------------------------------------------------------------------
136bool ComparePoints(vtkDataSet* ds1, vtkDataSet* ds2)

Callers 2

TestFieldDataFailuresFunction · 0.70

Calls 4

SetNameMethod · 0.45
SetNumberOfValuesMethod · 0.45
SetValueMethod · 0.45
AddArrayMethod · 0.45

Tested by

no test coverage detected