Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QBspTree Class Reference

#include <qbsptree_p.h>

+ Collaboration diagram for QBspTree:

Classes

struct  Data
 
struct  Node
 

Public Types

typedef Node::Type NodeType
 
typedef QBspTree::Data QBspTreeData
 
typedef void callback(QList< int > &leaf, const QRect &area, uint visited, QBspTreeData data)
 

Public Member Functions

 QBspTree ()
 
void create (int n, int d=-1)
 
void destroy ()
 
void init (const QRect &area, NodeType type)
 
void climbTree (const QRect &rect, callback *function, QBspTreeData data)
 
int leafCount () const
 
QList< int > & leaf (int i)
 
void insertLeaf (const QRect &r, int i)
 
void removeLeaf (const QRect &r, int i)
 

Protected Member Functions

void init (const QRect &area, int depth, NodeType type, int index)
 
void climbTree (const QRect &rect, callback *function, QBspTreeData data, int index)
 
int parentIndex (int i) const
 
int firstChildIndex (int i) const
 

Static Protected Member Functions

static void insert (QList< int > &leaf, const QRect &area, uint visited, QBspTreeData data)
 
static void remove (QList< int > &leaf, const QRect &area, uint visited, QBspTreeData data)
 

Detailed Description

Definition at line 24 of file qbsptree_p.h.

Member Typedef Documentation

◆ callback

typedef void QBspTree::callback(QList< int > &leaf, const QRect &area, uint visited, QBspTreeData data)

Definition at line 47 of file qbsptree_p.h.

◆ NodeType

Definition at line 35 of file qbsptree_p.h.

◆ QBspTreeData

Definition at line 46 of file qbsptree_p.h.

Constructor & Destructor Documentation

◆ QBspTree()

QT_BEGIN_NAMESPACE QBspTree::QBspTree ( )

Definition at line 8 of file qbsptree.cpp.

Member Function Documentation

◆ climbTree() [1/2]

void QBspTree::climbTree ( const QRect & rect,
callback * function,
QBspTreeData data )

Definition at line 33 of file qbsptree.cpp.

References climbTree(), and rect.

Referenced by climbTree(), climbTree(), insertLeaf(), and removeLeaf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ climbTree() [2/2]

void QBspTree::climbTree ( const QRect & rect,
callback * function,
QBspTreeData data,
int index )
protected

Definition at line 41 of file qbsptree.cpp.

References area(), climbTree(), firstChildIndex(), function, leaf(), pos, Q_ASSERT, and QBspTree::Node::VerticalPlane.

+ Here is the call graph for this function:

◆ create()

void QBspTree::create ( int n,
int d = -1 )

Definition at line 10 of file qbsptree.cpp.

References d, qMax(), and QList< T >::resize().

Referenced by QIconModeViewBase::setRowCount().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ destroy()

void QBspTree::destroy ( )

Definition at line 27 of file qbsptree.cpp.

References QList< T >::clear().

Referenced by QIconModeViewBase::clear().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ firstChildIndex()

int QBspTree::firstChildIndex ( int i) const
inlineprotected

Definition at line 68 of file qbsptree_p.h.

References i.

Referenced by climbTree(), and init().

+ Here is the caller graph for this function:

◆ init() [1/2]

void QBspTree::init ( const QRect & area,
int depth,
NodeType type,
int index )
protected

Definition at line 66 of file qbsptree.cpp.

References area(), QBspTree::Node::Both, firstChildIndex(), QBspTree::Node::HorizontalPlane, init(), QBspTree::Node::None, QRect::setBottom(), QRect::setLeft(), QRect::setRight(), QRect::setTop(), and QBspTree::Node::VerticalPlane.

+ Here is the call graph for this function:

◆ init() [2/2]

void QBspTree::init ( const QRect & area,
NodeType type )
inline

Definition at line 54 of file qbsptree_p.h.

References area(), and init().

Referenced by init(), and init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

void QBspTree::insert ( QList< int > & leaf,
const QRect & area,
uint visited,
QBspTreeData data )
staticprotected

Definition at line 95 of file qbsptree.cpp.

References QList< T >::append(), and leaf().

Referenced by insertLeaf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertLeaf()

void QBspTree::insertLeaf ( const QRect & r,
int i )
inline

Definition at line 60 of file qbsptree_p.h.

References climbTree(), i, and insert().

Referenced by QIconModeViewBase::removeHiddenRow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ leaf()

QList< int > & QBspTree::leaf ( int i)
inline

Definition at line 59 of file qbsptree_p.h.

References i.

Referenced by climbTree(), insert(), and remove().

+ Here is the caller graph for this function:

◆ leafCount()

int QBspTree::leafCount ( ) const
inline

Definition at line 58 of file qbsptree_p.h.

References QList< T >::size().

+ Here is the call graph for this function:

◆ parentIndex()

int QBspTree::parentIndex ( int i) const
inlineprotected

Definition at line 67 of file qbsptree_p.h.

References i.

◆ remove()

void QBspTree::remove ( QList< int > & leaf,
const QRect & area,
uint visited,
QBspTreeData data )
staticprotected

Definition at line 100 of file qbsptree.cpp.

References i, QListSpecialMethodsBase< T >::indexOf(), leaf(), and QList< T >::remove().

Referenced by removeLeaf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeLeaf()

void QBspTree::removeLeaf ( const QRect & r,
int i )
inline

Definition at line 61 of file qbsptree_p.h.

References climbTree(), i, and remove().

Referenced by QIconModeViewBase::appendHiddenRow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: