43 if (index >= nodes.size()) {
44 Q_ASSERT(!nodes.isEmpty());
45 function(leaf(index - nodes.size()), area, visited, data);
49 Node::
Type t = (Node::Type) nodes.at(index).type;
51 int pos = nodes.at(index).pos;
54 if (area.left() < pos)
55 climbTree(area, function, data, idx);
56 if (area.right() >= pos)
57 climbTree(area, function, data, idx + 1);
60 climbTree(area, function, data, idx);
61 if (area.bottom() >= pos)
62 climbTree(area, function, data, idx + 1);
73 QPoint center = area.center();
74 nodes[index].pos = (t == Node::VerticalPlane ? center.x() : center.y());
75 nodes[index].type = t;
81 front.setLeft(center.x());
82 back.setRight(center.x() - 1);
84 front.setTop(center.y());
85 back.setBottom(center.y() - 1);
90 init(back, depth, type, idx);
91 init(front, depth, type, idx + 1);