----------------------------------------------------------------
| 125 | |
| 126 | //---------------------------------------------------------------- |
| 127 | void vtkUniformGridAMRIterator::CheckItemAndLoopIfNeeded() |
| 128 | { |
| 129 | // Nothing to do if this is the end |
| 130 | while (!this->IsDoneWithTraversal()) |
| 131 | { |
| 132 | vtkDataObject* dObj = this->GetCurrentDataObject(); |
| 133 | if (!dObj && this->GetSkipEmptyNodes()) |
| 134 | { |
| 135 | // If we skip empty nodes, go to next |
| 136 | this->CurrentIndex++; |
| 137 | this->NextInternal(); |
| 138 | } |
| 139 | else |
| 140 | { |
| 141 | if (vtkDataObjectTreeIterator::IsDataObjectTree(dObj)) |
| 142 | { |
| 143 | // If we reach the child AMR, go up one level |
| 144 | this->CurrentLevel++; |
| 145 | this->CurrentIndex = 0; |
| 146 | this->NextInternal(); |
| 147 | |
| 148 | // This is important because we should not count the vtkPartitionedDataSet when iterating |
| 149 | this->CurrentFlatIndex--; |
| 150 | } |
| 151 | else |
| 152 | { |
| 153 | // We reached a valid item |
| 154 | break; |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | VTK_ABI_NAMESPACE_END |
no test coverage detected