QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
ON_RTree Class Reference

#include <opennurbs_rtree.h>

Public Member Functions

bool CreateMeshFaceTree (const class ON_Mesh *mesh)
 
int ElementCount ()
 
bool Insert (const double a_min[3], const double a_max[3], int a_element_id)
 
bool Insert (const double a_min[3], const double a_max[3], void *a_element_id)
 
bool Insert2d (const double a_min[2], const double a_max[2], int a_element_id)
 
bool Insert2d (const double a_min[2], const double a_max[2], void *a_element_id)
 
 ON_RTree (ON_MEMORY_POOL *heap=0, size_t leaf_count=0)
 
bool Remove (const double a_min[3], const double a_max[3], int a_elementId)
 
bool Remove (const double a_min[3], const double a_max[3], void *a_elementId)
 
bool Remove2d (const double a_min[2], const double a_max[2], int a_elementId)
 
bool Remove2d (const double a_min[2], const double a_max[2], void *a_elementId)
 
void RemoveAll ()
 
const ON_RTreeNodeRoot () const
 
bool Search (const double a_min[3], const double a_max[3], bool ON_MSC_CDECL resultCallback(void *a_context, ON__INT_PTR a_id), void *a_context) const
 
bool Search (const double a_min[3], const double a_max[3], ON_RTreeSearchResult &a_result) const
 
bool Search (const double a_min[3], const double a_max[3], ON_SimpleArray< int > &a_result) const
 
bool Search (const double a_min[3], const double a_max[3], ON_SimpleArray< ON_RTreeLeaf > &a_result) const
 
bool Search (const double a_min[3], const double a_max[3], ON_SimpleArray< void * > &a_result) const
 
bool Search2d (const double a_min[2], const double a_max[2], bool ON_MSC_CDECL resultCallback(void *a_context, ON__INT_PTR a_id), void *a_context) const
 
bool Search2d (const double a_min[2], const double a_max[2], ON_RTreeSearchResult &a_result) const
 
bool Search2d (const double a_min[2], const double a_max[2], ON_SimpleArray< int > &a_result) const
 
bool Search2d (const double a_min[2], const double a_max[2], ON_SimpleArray< ON_RTreeLeaf > &a_result) const
 
bool Search2d (const double a_min[2], const double a_max[2], ON_SimpleArray< void * > &a_result) const
 
size_t SizeOf () const
 
 ~ON_RTree ()
 

Static Public Member Functions

static bool Search (const ON_RTree &a_rtreeA, const ON_RTree &a_rtreeB, double tolerance, ON_SimpleArray< ON_2dex > &a_result)
 
static bool Search (const ON_RTree &a_rtreeA, const ON_RTree &a_rtreeB, double tolerance, void ON_MSC_CDECL resultCallback(void *a_context, ON__INT_PTR a_idA, ON__INT_PTR a_idB), void *a_context)
 

Private Member Functions

bool AddBranch (ON_RTreeBranch *, ON_RTreeNode *, ON_RTreeNode **)
 
bool InsertRect (ON_RTreeBBox *, ON__INT_PTR, ON_RTreeNode **, int)
 
bool InsertRectRec (ON_RTreeBBox *, ON__INT_PTR, ON_RTreeNode *, ON_RTreeNode **, int)
 
void LoadNodes (ON_RTreeNode *, ON_RTreeNode *, struct ON_RTreePartitionVars *)
 
void ReInsert (ON_RTreeNode *, struct ON_RTreeListNode **)
 
void RemoveAllRec (ON_RTreeNode *)
 
bool RemoveRect (ON_RTreeBBox *, ON__INT_PTR, ON_RTreeNode **)
 
bool RemoveRectRec (ON_RTreeBBox *, ON__INT_PTR, ON_RTreeNode *, struct ON_RTreeListNode **)
 
void SplitNode (ON_RTreeNode *, ON_RTreeBranch *, ON_RTreeNode **)
 

Private Attributes

ON_RTreeMemPool m_mem_pool
 
size_t m_reserved
 
ON_RTreeNodem_root
 

Constructor & Destructor Documentation

◆ ON_RTree()

ON_RTree::ON_RTree ( ON_MEMORY_POOL * heap = 0,
size_t leaf_count = 0 )

◆ ~ON_RTree()

ON_RTree::~ON_RTree ( )

Member Function Documentation

◆ AddBranch()

bool ON_RTree::AddBranch ( ON_RTreeBranch * a_branch,
ON_RTreeNode * a_node,
ON_RTreeNode ** a_newNode )
private

◆ CreateMeshFaceTree()

bool ON_RTree::CreateMeshFaceTree ( const class ON_Mesh * mesh)

◆ ElementCount()

int ON_RTree::ElementCount ( )

◆ Insert() [1/2]

bool ON_RTree::Insert ( const double a_min[3],
const double a_max[3],
int a_element_id )

◆ Insert() [2/2]

bool ON_RTree::Insert ( const double a_min[3],
const double a_max[3],
void * a_element_id )

◆ Insert2d() [1/2]

bool ON_RTree::Insert2d ( const double a_min[2],
const double a_max[2],
int a_element_id )

◆ Insert2d() [2/2]

bool ON_RTree::Insert2d ( const double a_min[2],
const double a_max[2],
void * a_element_id )

◆ InsertRect()

bool ON_RTree::InsertRect ( ON_RTreeBBox * a_rect,
ON__INT_PTR a_id,
ON_RTreeNode ** a_root,
int a_level )
private

◆ InsertRectRec()

bool ON_RTree::InsertRectRec ( ON_RTreeBBox * a_rect,
ON__INT_PTR a_id,
ON_RTreeNode * a_node,
ON_RTreeNode ** a_newNode,
int a_level )
private

◆ LoadNodes()

void ON_RTree::LoadNodes ( ON_RTreeNode * a_nodeA,
ON_RTreeNode * a_nodeB,
struct ON_RTreePartitionVars * a_parVars )
private

◆ ReInsert()

void ON_RTree::ReInsert ( ON_RTreeNode * a_node,
struct ON_RTreeListNode ** a_listNode )
private

◆ Remove() [1/2]

bool ON_RTree::Remove ( const double a_min[3],
const double a_max[3],
int a_elementId )

◆ Remove() [2/2]

bool ON_RTree::Remove ( const double a_min[3],
const double a_max[3],
void * a_elementId )

◆ Remove2d() [1/2]

bool ON_RTree::Remove2d ( const double a_min[2],
const double a_max[2],
int a_elementId )

◆ Remove2d() [2/2]

bool ON_RTree::Remove2d ( const double a_min[2],
const double a_max[2],
void * a_elementId )

◆ RemoveAll()

void ON_RTree::RemoveAll ( )

◆ RemoveAllRec()

void ON_RTree::RemoveAllRec ( ON_RTreeNode * a_node)
private

◆ RemoveRect()

bool ON_RTree::RemoveRect ( ON_RTreeBBox * a_rect,
ON__INT_PTR a_id,
ON_RTreeNode ** a_root )
private

◆ RemoveRectRec()

bool ON_RTree::RemoveRectRec ( ON_RTreeBBox * a_rect,
ON__INT_PTR a_id,
ON_RTreeNode * a_node,
struct ON_RTreeListNode ** a_listNode )
private

◆ Root()

const ON_RTreeNode * ON_RTree::Root ( ) const

◆ Search() [1/7]

bool ON_RTree::Search ( const double a_min[3],
const double a_max[3],
bool ON_MSC_CDECL resultCallbackvoid *a_context, ON__INT_PTR a_id,
void * a_context ) const

◆ Search() [2/7]

bool ON_RTree::Search ( const double a_min[3],
const double a_max[3],
ON_RTreeSearchResult & a_result ) const

◆ Search() [3/7]

bool ON_RTree::Search ( const double a_min[3],
const double a_max[3],
ON_SimpleArray< int > & a_result ) const

◆ Search() [4/7]

bool ON_RTree::Search ( const double a_min[3],
const double a_max[3],
ON_SimpleArray< ON_RTreeLeaf > & a_result ) const

◆ Search() [5/7]

bool ON_RTree::Search ( const double a_min[3],
const double a_max[3],
ON_SimpleArray< void * > & a_result ) const

◆ Search() [6/7]

bool ON_RTree::Search ( const ON_RTree & a_rtreeA,
const ON_RTree & a_rtreeB,
double tolerance,
ON_SimpleArray< ON_2dex > & a_result )
static

◆ Search() [7/7]

bool ON_RTree::Search ( const ON_RTree & a_rtreeA,
const ON_RTree & a_rtreeB,
double tolerance,
void ON_MSC_CDECL resultCallbackvoid *a_context, ON__INT_PTR a_idA, ON__INT_PTR a_idB,
void * a_context )
static

◆ Search2d() [1/5]

bool ON_RTree::Search2d ( const double a_min[2],
const double a_max[2],
bool ON_MSC_CDECL resultCallbackvoid *a_context, ON__INT_PTR a_id,
void * a_context ) const

◆ Search2d() [2/5]

bool ON_RTree::Search2d ( const double a_min[2],
const double a_max[2],
ON_RTreeSearchResult & a_result ) const

◆ Search2d() [3/5]

bool ON_RTree::Search2d ( const double a_min[2],
const double a_max[2],
ON_SimpleArray< int > & a_result ) const

◆ Search2d() [4/5]

bool ON_RTree::Search2d ( const double a_min[2],
const double a_max[2],
ON_SimpleArray< ON_RTreeLeaf > & a_result ) const

◆ Search2d() [5/5]

bool ON_RTree::Search2d ( const double a_min[2],
const double a_max[2],
ON_SimpleArray< void * > & a_result ) const

◆ SizeOf()

size_t ON_RTree::SizeOf ( ) const

◆ SplitNode()

void ON_RTree::SplitNode ( ON_RTreeNode * a_node,
ON_RTreeBranch * a_branch,
ON_RTreeNode ** a_newNode )
private

Member Data Documentation

◆ m_mem_pool

ON_RTreeMemPool ON_RTree::m_mem_pool
private

◆ m_reserved

size_t ON_RTree::m_reserved
private

◆ m_root

ON_RTreeNode* ON_RTree::m_root
private

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