------------------------------------------------------------------------------
| 164 | |
| 165 | //------------------------------------------------------------------------------ |
| 166 | bool vtkVariantArray::CopyComponent(int dstComponent, vtkAbstractArray* src, int srcComponent) |
| 167 | { |
| 168 | auto* source = vtkVariantArray::SafeDownCast(src); |
| 169 | if (!source || source->GetNumberOfTuples() != this->GetNumberOfTuples() || srcComponent < 0 || |
| 170 | srcComponent >= source->GetNumberOfComponents() || dstComponent < 0 || |
| 171 | dstComponent >= this->GetNumberOfComponents()) |
| 172 | { |
| 173 | return false; |
| 174 | } |
| 175 | |
| 176 | vtkIdType nn = this->GetNumberOfTuples(); |
| 177 | vtkSMPTools::For(0, nn, |
| 178 | [this, dstComponent, source, srcComponent](vtkIdType begin, vtkIdType end) |
| 179 | { |
| 180 | vtkIdType ndc = this->GetNumberOfComponents(); |
| 181 | vtkIdType nsc = source->GetNumberOfComponents(); |
| 182 | for (vtkIdType ii = begin; ii < end; ++ii) |
| 183 | { |
| 184 | this->SetValue(ii * ndc + dstComponent, source->GetValue(ii * nsc + srcComponent)); |
| 185 | } |
| 186 | }); |
| 187 | return true; |
| 188 | } |
| 189 | |
| 190 | //------------------------------------------------------------------------------ |
| 191 | int vtkVariantArray::GetDataType() const |
nothing calls this directly
no test coverage detected