------------------------------------------------------------------------------ Get a pointer to a tuple at the ith location. This is a dangerous method (it is not thread safe since a pointer is returned).
| 587 | // Get a pointer to a tuple at the ith location. This is a dangerous method |
| 588 | // (it is not thread safe since a pointer is returned). |
| 589 | double* vtkBitArray::GetTuple(vtkIdType i) |
| 590 | { |
| 591 | if (this->TupleSize < this->NumberOfComponents) |
| 592 | { |
| 593 | this->TupleSize = this->NumberOfComponents; |
| 594 | delete[] this->Tuple; |
| 595 | this->Tuple = new double[this->TupleSize]; |
| 596 | } |
| 597 | |
| 598 | vtkIdType loc = this->NumberOfComponents * i; |
| 599 | for (int j = 0; j < this->NumberOfComponents; j++) |
| 600 | { |
| 601 | this->Tuple[j] = static_cast<double>(this->GetValue(loc + j)); |
| 602 | } |
| 603 | |
| 604 | return this->Tuple; |
| 605 | } |
| 606 | |
| 607 | //------------------------------------------------------------------------------ |
| 608 | // Copy the tuple value into a user-provided array. |