| 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 | |
| 162 | struct SqueezeImpl : public vtkCellArray::DispatchUtilities |
nothing calls this directly
no test coverage detected