Geophysical Inversion and Modelling Library  v1.5.1
GIMLI::KDTreeWrapper Class Reference

Interface class for a kd-search tree. We use it for fast nearest neighbor point search in three dimensions. More...

+ Collaboration diagram for GIMLI::KDTreeWrapper:

Public Member Functions

 KDTreeWrapper ()
 
 ~KDTreeWrapper ()
 
void insert (Node *node)
 
Nodenearest (const RVector3 &pos)
 
uint size () const
 
NodeKDTreetree ()
 

Protected Attributes

NodeKDTreetree_
 

Detailed Description

Interface class for a kd-search tree. We use it for fast nearest neighbor point search in three dimensions.

Interface class for a kd-search tree. Currently we use libkdtree++ from: http://libkdtreeplus-pplus-p.sourcearchive.com/ We use it for fast nearest neighbor point search in three dimensions. The tree is designed to cooperate with Mesh thus it has to be feeded by pointers of Node.

Constructor & Destructor Documentation

◆ KDTreeWrapper()

GIMLI::KDTreeWrapper::KDTreeWrapper ( )

Standard constructor

◆ ~KDTreeWrapper()

GIMLI::KDTreeWrapper::~KDTreeWrapper ( )

Standard destructor

Member Function Documentation

◆ insert()

void GIMLI::KDTreeWrapper::insert ( Node node)

Insert new node to the tree

Referenced by GIMLI::Mesh::createNodeWithCheck(), and GIMLI::Mesh::createSecondaryNode().

◆ nearest()

Node * GIMLI::KDTreeWrapper::nearest ( const RVector3 pos)

◆ size()

uint GIMLI::KDTreeWrapper::size ( ) const

Return the amount of nodes inside the tree.

◆ tree()

NodeKDTree * GIMLI::KDTreeWrapper::tree ( )

Return a pointer to the base libkdetree++