Geophysical Inversion and Modelling Library
v1.5.1
|
Interface class for a kd-search tree. We use it for fast nearest neighbor point search in three dimensions. More...
Public Member Functions | |
KDTreeWrapper () | |
~KDTreeWrapper () | |
void | insert (Node *node) |
Node * | nearest (const RVector3 &pos) |
uint | size () const |
NodeKDTree * | tree () |
Protected Attributes | |
NodeKDTree * | tree_ |
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.
GIMLI::KDTreeWrapper::KDTreeWrapper | ( | ) |
Standard constructor
GIMLI::KDTreeWrapper::~KDTreeWrapper | ( | ) |
Standard destructor
void GIMLI::KDTreeWrapper::insert | ( | Node * | node | ) |
Insert new node to the tree
Referenced by GIMLI::Mesh::createNodeWithCheck(), and GIMLI::Mesh::createSecondaryNode().
Find the nearest Node to the coordinates pos.
Referenced by GIMLI::Mesh::createNodeWithCheck(), GIMLI::Mesh::createSecondaryNode(), GIMLI::Mesh::findCell(), GIMLI::Mesh::findCellsAlongRay(), and GIMLI::Mesh::findNearestNode().
uint GIMLI::KDTreeWrapper::size | ( | ) | const |
Return the amount of nodes inside the tree.
NodeKDTree * GIMLI::KDTreeWrapper::tree | ( | ) |
Return a pointer to the base libkdetree++