(cursor, sideArray, levelArray)
| 89 | |
| 90 | |
| 91 | def handleNode(cursor, sideArray, levelArray): |
| 92 | cellBounds = [0, 0, 0, 0, 0, 0] |
| 93 | level = cursor.GetLevel() |
| 94 | cursor.GetBounds(cellBounds) |
| 95 | |
| 96 | # Add field |
| 97 | idx = cursor.GetGlobalNodeIndex() |
| 98 | side = mandelbrotSide(cellBounds) |
| 99 | sideArray.InsertTuple1(idx, side) |
| 100 | mask.InsertTuple1(idx, side < CUT_OFF) |
| 101 | |
| 102 | if cursor.IsLeaf(): |
| 103 | if shouldRefine(cursor.GetLevel(), cellBounds): |
| 104 | cursor.SubdivideLeaf() |
| 105 | handleNode(cursor, sideArray, mask) |
| 106 | |
| 107 | else: |
| 108 | nbChildren = cursor.GetNumberOfChildren() |
| 109 | for childIdx in range(nbChildren): |
| 110 | cursor.ToChild(childIdx) |
| 111 | handleNode(cursor, sideArray, mask) |
| 112 | cursor.ToParent() |
| 113 | |
| 114 | |
| 115 | # ----------------------------------------------------------------------------- |
no test coverage detected