A node in the KD-Tree. More...
#include <imesh_kd_tree.h>
Public Member Functions | |
imesh_kd_tree_node (const vgl_box_3d< double > &outer_box, const vgl_box_3d< double > &inner_box, vcl_auto_ptr< imesh_kd_tree_node > left, vcl_auto_ptr< imesh_kd_tree_node > right) | |
Constructor for internal node. | |
imesh_kd_tree_node (const vgl_box_3d< double > &outer_box, const vgl_box_3d< double > &inner_box, unsigned int index) | |
Constructor for leaf node. | |
imesh_kd_tree_node (const imesh_kd_tree_node &other) | |
Copy Constructor (makes a deep copy recursively). | |
bool | is_leaf () const |
Return true if this node is a leaf node. | |
Public Attributes | |
vgl_box_3d< double > | outer_box_ |
Outer bounding box. | |
vgl_box_3d< double > | inner_box_ |
Inner bounding box. | |
unsigned int | index_ |
index into original data vector (at leaf nodes). | |
vcl_auto_ptr< imesh_kd_tree_node > | left_ |
Left child. | |
vcl_auto_ptr< imesh_kd_tree_node > | right_ |
Right child. |
A node in the KD-Tree.
Definition at line 25 of file imesh_kd_tree.h.
imesh_kd_tree_node::imesh_kd_tree_node | ( | const vgl_box_3d< double > & | outer_box, |
const vgl_box_3d< double > & | inner_box, | ||
vcl_auto_ptr< imesh_kd_tree_node > | left, | ||
vcl_auto_ptr< imesh_kd_tree_node > | right | ||
) | [inline] |
Constructor for internal node.
Definition at line 28 of file imesh_kd_tree.h.
imesh_kd_tree_node::imesh_kd_tree_node | ( | const vgl_box_3d< double > & | outer_box, |
const vgl_box_3d< double > & | inner_box, | ||
unsigned int | index | ||
) | [inline] |
Constructor for leaf node.
Definition at line 37 of file imesh_kd_tree.h.
imesh_kd_tree_node::imesh_kd_tree_node | ( | const imesh_kd_tree_node & | other | ) | [inline] |
Copy Constructor (makes a deep copy recursively).
Definition at line 44 of file imesh_kd_tree.h.
bool imesh_kd_tree_node::is_leaf | ( | ) | const [inline] |
Return true if this node is a leaf node.
Definition at line 53 of file imesh_kd_tree.h.
unsigned int imesh_kd_tree_node::index_ |
index into original data vector (at leaf nodes).
Additional indices are assigned to internal nodes
Definition at line 61 of file imesh_kd_tree.h.
Inner bounding box.
Definition at line 58 of file imesh_kd_tree.h.
vcl_auto_ptr<imesh_kd_tree_node> imesh_kd_tree_node::left_ |
Left child.
Definition at line 63 of file imesh_kd_tree.h.
Outer bounding box.
Definition at line 56 of file imesh_kd_tree.h.
vcl_auto_ptr<imesh_kd_tree_node> imesh_kd_tree_node::right_ |
Right child.
Definition at line 65 of file imesh_kd_tree.h.