MCPcopy Create free account
hub / github.com/Kitware/VTK / operator()

Method operator()

Common/DataModel/vtkCellArray.cxx:141–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139{
140 template <class OffsetsT, class ConnectivityT>
141 void operator()(OffsetsT* offsets, ConnectivityT* conn) const
142 {
143 using ValueType = GetAPIType<OffsetsT>;
144 using AccessorType = vtkDataArrayAccessor<OffsetsT>;
145 conn->Initialize();
146 if (offsets->GetArrayType() == vtkArrayTypes::VTK_AFFINE_ARRAY)
147 {
148 // AffineArray's Initialize destroys the backend of the offsets array,
149 // so we only set the number of values to 0 to preserve the backend.
150 offsets->SetNumberOfValues(0);
151 }
152 else
153 {
154 offsets->Initialize();
155 }
156 AccessorType accessor(offsets);
157 ValueType firstOffset = 0;
158 accessor.InsertNext(firstOffset);
159 }
160};
161
162struct SqueezeImpl : public vtkCellArray::DispatchUtilities

Callers

nothing calls this directly

Calls 3

GetArrayTypeMethod · 0.80
InitializeMethod · 0.45
SetNumberOfValuesMethod · 0.45

Tested by

no test coverage detected