------------------------------------------------------------------------------ Description: Set the tuple at the ith location using the jth tuple in the source array. This method assumes that the two arrays have the same type and structure. Note that range checking and memory allocation is not performed; use in conjunction with SetNumberOfTuples() to allocate space.
| 397 | // and structure. Note that range checking and memory allocation is not |
| 398 | // performed; use in conjunction with SetNumberOfTuples() to allocate space. |
| 399 | void vtkBitArray::SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source) |
| 400 | { |
| 401 | vtkBitArray* ba = vtkArrayDownCast<vtkBitArray>(source); |
| 402 | if (!ba) |
| 403 | { |
| 404 | vtkWarningMacro("Input and output arrays types do not match."); |
| 405 | return; |
| 406 | } |
| 407 | |
| 408 | vtkIdType loci = i * this->NumberOfComponents; |
| 409 | vtkIdType locj = j * ba->GetNumberOfComponents(); |
| 410 | for (vtkIdType cur = 0; cur < this->NumberOfComponents; cur++) |
| 411 | { |
| 412 | this->SetValue(loci + cur, ba->GetValue(locj + cur)); |
| 413 | } |
| 414 | this->DataChanged(); |
| 415 | } |
| 416 | |
| 417 | //------------------------------------------------------------------------------ |
| 418 | // Description: |