------------------------------------------------------------------------------ Unoptimized version of UnstructuredGridExecute for non vtkUnstructuredGrid instances
| 1356 | //------------------------------------------------------------------------------ |
| 1357 | // Unoptimized version of UnstructuredGridExecute for non vtkUnstructuredGrid instances |
| 1358 | int vtkDataSetSurfaceFilter::UnstructuredGridBaseExecute( |
| 1359 | vtkDataSet* dataSetInput, vtkPolyData* output) |
| 1360 | { |
| 1361 | vtkUnstructuredGridBase* input = vtkUnstructuredGridBase::SafeDownCast(dataSetInput); |
| 1362 | |
| 1363 | // Before we start doing anything interesting, check if we need handle |
| 1364 | // non-linear cells using sub-division. |
| 1365 | bool handleSubdivision = false; |
| 1366 | if (this->NonlinearSubdivisionLevel >= 1) |
| 1367 | { |
| 1368 | // Check to see if the data actually has nonlinear cells. Handling |
| 1369 | // nonlinear cells adds unnecessary work if we only have linear cells. |
| 1370 | vtkIdType numCells = input->GetNumberOfCells(); |
| 1371 | if (input->IsHomogeneous()) |
| 1372 | { |
| 1373 | if (numCells >= 1) |
| 1374 | { |
| 1375 | handleSubdivision = !vtkCellTypeUtilities::IsLinear(input->GetCellType(0)); |
| 1376 | } |
| 1377 | } |
| 1378 | else |
| 1379 | { |
| 1380 | for (vtkIdType cellId = 0; cellId < numCells; ++cellId) |
| 1381 | { |
| 1382 | if (!vtkCellTypeUtilities::IsLinear(input->GetCellType(cellId))) |
| 1383 | { |
| 1384 | handleSubdivision = true; |
| 1385 | break; |
| 1386 | } |
| 1387 | } |
| 1388 | } |
| 1389 | } |
| 1390 | |
| 1391 | return this->UnstructuredGridExecuteInternal(input, output, handleSubdivision); |
| 1392 | } |
| 1393 | |
| 1394 | //======================================================================== |
| 1395 | // Tris are now degenerate quads so we only need one hash table. |
no test coverage detected