------------------------------------------------------------------------------
| 217 | |
| 218 | //------------------------------------------------------------------------------ |
| 219 | void vtkHyperTreeGridToDualGrid::TraverseDualRecursively( |
| 220 | vtkHyperTreeGridNonOrientedMooreSuperCursor* cursor, vtkHyperTreeGrid* input) |
| 221 | { |
| 222 | // TODO - code duplication is evil, fold this with other TraverseDual |
| 223 | // Create cell corner if cursor is at leaf |
| 224 | if (cursor->IsLeaf()) |
| 225 | { |
| 226 | // Center is a leaf, create dual items depending on dimension |
| 227 | switch (input->GetDimension()) |
| 228 | { |
| 229 | case 1: |
| 230 | this->GenerateDualCornerFromLeaf1D(cursor, input); |
| 231 | break; |
| 232 | case 2: |
| 233 | this->GenerateDualCornerFromLeaf2D(cursor, input); |
| 234 | break; |
| 235 | case 3: |
| 236 | this->GenerateDualCornerFromLeaf3D(cursor, input); |
| 237 | break; |
| 238 | } // switch ( this->Dimension ) |
| 239 | } // if ( cursor->IsLeaf() ) |
| 240 | else |
| 241 | { |
| 242 | // Cursor is not at leaf, recurse to all children |
| 243 | int numChildren = input->GetNumberOfChildren(); |
| 244 | for (int child = 0; child < numChildren; ++child) |
| 245 | { |
| 246 | if (this->CheckAbort()) |
| 247 | { |
| 248 | break; |
| 249 | } |
| 250 | cursor->ToChild(child); |
| 251 | // Recurse |
| 252 | this->TraverseDualRecursively(cursor, input); |
| 253 | cursor->ToParent(); |
| 254 | } // child |
| 255 | } // else |
| 256 | } |
| 257 | |
| 258 | //------------------------------------------------------------------------------ |
| 259 | void vtkHyperTreeGridToDualGrid::GenerateDualCornerFromLeaf1D( |
no test coverage detected