------------------------------------------------------------------------------
| 753 | |
| 754 | //------------------------------------------------------------------------------ |
| 755 | void vtkBitArray::UpdateLookup() |
| 756 | { |
| 757 | if (!this->Lookup) |
| 758 | { |
| 759 | this->Lookup = new vtkBitArrayLookup(); |
| 760 | this->Lookup->ZeroArray = vtkIdList::New(); |
| 761 | this->Lookup->OneArray = vtkIdList::New(); |
| 762 | } |
| 763 | if (this->Lookup->Rebuild) |
| 764 | { |
| 765 | int numComps = this->GetNumberOfComponents(); |
| 766 | vtkIdType numTuples = this->GetNumberOfTuples(); |
| 767 | this->Lookup->ZeroArray->Allocate(numComps * numTuples); |
| 768 | this->Lookup->OneArray->Allocate(numComps * numTuples); |
| 769 | for (vtkIdType i = 0; i < numComps * numTuples; i++) |
| 770 | { |
| 771 | if (this->GetValue(i)) |
| 772 | { |
| 773 | this->Lookup->OneArray->InsertNextId(i); |
| 774 | } |
| 775 | else |
| 776 | { |
| 777 | this->Lookup->ZeroArray->InsertNextId(i); |
| 778 | } |
| 779 | } |
| 780 | this->Lookup->Rebuild = false; |
| 781 | } |
| 782 | } |
| 783 | |
| 784 | //------------------------------------------------------------------------------ |
| 785 | vtkIdType vtkBitArray::LookupValue(vtkVariant var) |
no test coverage detected