44 if (index >= nodes.size()) {
45 Q_ASSERT(!nodes.isEmpty());
46 function(leaf(index - nodes.size()), area, visited, data);
50 Node::
Type t = (Node::Type) nodes.at(index).type;
52 int pos = nodes.at(index).pos;
55 if (area.left() < pos)
56 climbTree(area, function, data, idx);
57 if (area.right() >= pos)
58 climbTree(area, function, data, idx + 1);
61 climbTree(area, function, data, idx);
62 if (area.bottom() >= pos)
63 climbTree(area, function, data, idx + 1);
74 QPoint center = area.center();
75 nodes[index].pos = (t == Node::VerticalPlane ? center.x() : center.y());
76 nodes[index].type = t;
82 front.setLeft(center.x());
83 back.setRight(center.x() - 1);
85 front.setTop(center.y());
86 back.setBottom(center.y() - 1);
91 init(back, depth, type, idx);
92 init(front, depth, type, idx + 1);