----------------------------------------------------------------------------------------------
| 258 | |
| 259 | //---------------------------------------------------------------------------------------------- |
| 260 | bool vtkHyperTreeGridFeatureEdges::ShouldAddEdge2D( |
| 261 | vtkHyperTreeGridNonOrientedVonNeumannSuperCursor* cursor, unsigned int edgeId) |
| 262 | { |
| 263 | auto neighborVisible = [&cursor](unsigned int neighborId) |
| 264 | { return cursor->HasTree(neighborId) && !cursor->IsMasked(neighborId); }; |
| 265 | |
| 266 | const unsigned int neighborId = VON_NEUMANN_NEIGH_ID_2D[edgeId]; |
| 267 | |
| 268 | // A leaf cell generate an edge if: |
| 269 | // - The cell is visible and there is no visible neighbor (of same level) sharing the edge |
| 270 | // - The cell is masked and there is a visible neighbor of inferior level (leaf) sharing the edge |
| 271 | return (!cursor->IsMasked() && !neighborVisible(neighborId)) || |
| 272 | (cursor->IsMasked() && neighborVisible(neighborId) && |
| 273 | cursor->GetLevel(neighborId) < cursor->GetLevel()); |
| 274 | } |
| 275 | |
| 276 | //---------------------------------------------------------------------------------------------- |
| 277 | bool vtkHyperTreeGridFeatureEdges::ShouldAddEdge3D( |
no test coverage detected