81 if (index >=
nodes.count()) {
89 int pos =
nodes.at(index).pos;
92 if (area.
left() < pos)
94 if (area.
right() >= pos)
100 climbTree(area,
function, data, idx + 1);
128 init(back, depth, type, idx);
129 init(front, depth, type, idx + 1);
void setBottom(int pos)
Sets the bottom edge of the rectangle to the given y coordinate.
#define QT_END_NAMESPACE
This macro expands to.
void remove(int i)
Removes the element at index position i.
QVector< int > & leaf(int i)
void init(const QRect &area, NodeType type)
int left() const
Returns the x-coordinate of the rectangle's left edge.
QVector< QVector< int > > leaves
int firstChildIndex(int i) const
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void resize(int size)
Sets the size of the vector to size.
static void remove(QVector< int > &leaf, const QRect &area, uint visited, QBspTreeData data)
void callback(QVector< int > &leaf, const QRect &area, uint visited, QBspTreeData data)
#define QT_BEGIN_NAMESPACE
This macro expands to.
void clear()
Removes all the elements from the vector and releases the memory used by the vector.
void setTop(int pos)
Sets the top edge of the rectangle to the given y coordinate.
void setRight(int pos)
Sets the right edge of the rectangle to the given x coordinate.
void append(const T &t)
Inserts value at the end of the vector.
static const char * data(const QByteArray &arr)
static void insert(QVector< int > &leaf, const QRect &area, uint visited, QBspTreeData data)
void climbTree(const QRect &rect, callback *function, QBspTreeData data)
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the vector, searching forward from ind...
Q_CORE_EXPORT QTextStream & center(QTextStream &s)
QPoint center() const
Returns the center point of the rectangle.
int top() const
Returns the y-coordinate of the rectangle's top edge.
int right() const
Returns the x-coordinate of the rectangle's right edge.
void setLeft(int pos)
Sets the left edge of the rectangle to the given x coordinate.
The QPoint class defines a point in the plane using integer precision.
The QRect class defines a rectangle in the plane using integer precision.
int y() const
Returns the y coordinate of this point.
int x() const
Returns the x coordinate of this point.
static int area(const QSize &s)
void create(int n, int d=-1)