Public Member Functions | Public Attributes
imesh_kd_tree_node Struct Reference

A node in the KD-Tree. More...

#include <imesh_kd_tree.h>

List of all members.

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_nodeleft_
 Left child.
vcl_auto_ptr< imesh_kd_tree_noderight_
 Right child.

Detailed Description

A node in the KD-Tree.

Definition at line 25 of file imesh_kd_tree.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation

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.

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.

Right child.

Definition at line 65 of file imesh_kd_tree.h.


The documentation for this struct was generated from the following file: