------------------------------------------------------------------------------
| 223 | |
| 224 | //------------------------------------------------------------------------------ |
| 225 | void vtkAdaptiveDataSetSurfaceFilter::ProcessTrees(vtkHyperTreeGrid* input, vtkPolyData* output) |
| 226 | { |
| 227 | if (this->Points) |
| 228 | { |
| 229 | this->Points->Delete(); |
| 230 | } |
| 231 | // Create storage for corners of leaf cells |
| 232 | this->Points = vtkPoints::New(); |
| 233 | |
| 234 | // Create storage for unstructured leaf cells |
| 235 | if (this->Cells) |
| 236 | { |
| 237 | this->Cells->Delete(); |
| 238 | } |
| 239 | this->Cells = vtkCellArray::New(); |
| 240 | |
| 241 | // Initialize a Locator |
| 242 | if (this->Merging) |
| 243 | { |
| 244 | this->Locator = vtkMergePoints::New(); |
| 245 | this->Locator->InitPointInsertion(this->Points, input->GetBounds()); |
| 246 | } |
| 247 | |
| 248 | // Retrieve material mask |
| 249 | this->Mask = input->HasMask() ? input->GetMask() : nullptr; |
| 250 | |
| 251 | if (this->Dimension == 3) |
| 252 | { |
| 253 | vtkIdType index; |
| 254 | vtkHyperTreeGrid::vtkHyperTreeGridIterator it; |
| 255 | input->InitializeTreeIterator(it); |
| 256 | vtkNew<vtkHyperTreeGridNonOrientedVonNeumannSuperCursorLight> cursor; |
| 257 | while (it.GetNextTree(index)) |
| 258 | { |
| 259 | if (this->CheckAbort()) |
| 260 | { |
| 261 | break; |
| 262 | } |
| 263 | // In 3 dimensions, von Neumann neighborhood information is needed |
| 264 | input->InitializeNonOrientedVonNeumannSuperCursorLight(cursor, index); |
| 265 | this->RecursivelyProcessTree3D(cursor, 0); |
| 266 | } |
| 267 | } |
| 268 | else |
| 269 | { |
| 270 | vtkIdType index; |
| 271 | vtkHyperTreeGrid::vtkHyperTreeGridIterator it; |
| 272 | input->InitializeTreeIterator(it); |
| 273 | vtkNew<vtkHyperTreeGridNonOrientedGeometryCursor> cursor; |
| 274 | while (it.GetNextTree(index)) |
| 275 | { |
| 276 | if (this->CheckAbort()) |
| 277 | { |
| 278 | break; |
| 279 | } |
| 280 | // Otherwise, geometric properties of the cells suffice |
| 281 | input->InitializeNonOrientedGeometryCursor(cursor, index); |
| 282 | if (this->Dimension == 1) |
no test coverage detected