Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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 25 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 48 of file qbsptree_p.h.

◆ NodeType

Definition at line 36 of file qbsptree_p.h.

◆ QBspTreeData

Definition at line 47 of file qbsptree_p.h.

Constructor & Destructor Documentation

◆ QBspTree()

QT_BEGIN_NAMESPACE QBspTree::QBspTree ( )

Definition at line 9 of file qbsptree.cpp.

Member Function Documentation

◆ climbTree() [1/2]

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

Definition at line 34 of file qbsptree.cpp.

◆ climbTree() [2/2]

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

Definition at line 42 of file qbsptree.cpp.

References firstChildIndex(), and QBspTree::Node::VerticalPlane.

Here is the call graph for this function:

◆ create()

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

Definition at line 11 of file qbsptree.cpp.

◆ destroy()

void QBspTree::destroy ( )

Definition at line 28 of file qbsptree.cpp.

◆ firstChildIndex()

int QBspTree::firstChildIndex ( int i) const
inlineprotected

Definition at line 69 of file qbsptree_p.h.

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 67 of file qbsptree.cpp.

References QBspTree::Node::Both, firstChildIndex(), QBspTree::Node::HorizontalPlane, QBspTree::Node::None, 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 55 of file qbsptree_p.h.

◆ insert()

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

Definition at line 96 of file qbsptree.cpp.

References QBspTree::Data::i.

◆ insertLeaf()

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

Definition at line 61 of file qbsptree_p.h.

◆ leaf()

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

Definition at line 60 of file qbsptree_p.h.

◆ leafCount()

int QBspTree::leafCount ( ) const
inline

Definition at line 59 of file qbsptree_p.h.

◆ parentIndex()

int QBspTree::parentIndex ( int i) const
inlineprotected

Definition at line 68 of file qbsptree_p.h.

◆ remove()

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

Definition at line 101 of file qbsptree.cpp.

References QBspTree::Data::i.

◆ removeLeaf()

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

Definition at line 62 of file qbsptree_p.h.


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