Ponca
aa50bfdf187919869239c5b44b748842569114c1
Point Cloud Analysis library
|
The node type used by default by the kd-tree. More...
#include <kdTreeTraits.h>
Public Types | |
enum | : std::size_t { MAX_COUNT = std::size_t(2) << InnerType::INDEX_BITS } |
using | AabbType = Eigen::AlignedBox< Scalar, DataPoint::Dim > |
The type used to store node bounding boxes. | |
Public Member Functions | |
bool | is_leaf () const |
void | set_is_leaf (bool is_leaf) |
void | configure_range (Index start, Index size, const AabbType &aabb) |
Configures the range of the node in the sample index array of the kd-tree. | |
void | configure_inner (Scalar split_value, Index first_child_id, Index split_dim) |
Configures the inner node information. | |
Index | leaf_start () const |
The start index of the range of the leaf node in the sample index array. | |
LeafSize | leaf_size () const |
The size of the range of the leaf node in the sample index array. | |
Scalar | inner_split_value () const |
The position of the AABB split of the inner node. | |
int | inner_split_dim () const |
Which axis the split of the AABB of the inner node was done on. | |
Index | inner_first_child_id () const |
The index of the first child of the node in the node array of the kd-tree. | |
Protected Member Functions | |
LeafType & | getAsLeaf () |
InnerType & | getAsInner () |
const LeafType & | getAsLeaf () const |
const InnerType & | getAsInner () const |
The node type used by default by the kd-tree.
It is possible to modify the Inner and Leaf node types by inheritance. For instance, to add a Bounding box to inner nodes, define a custom inner node type:
Define a custom node type to use it, and expose custom data (inner/leaf node are not exposed directly):
To use in the KdTree, define a type using the custom node:
The added attribute can be accessed
Definition at line 109 of file kdTreeTraits.h.
using Ponca::KdTreeCustomizableNode< Index, NodeIndex, DataPoint, LeafSize, _InnerNodeType, _LeafNodeType >::AabbType = Eigen::AlignedBox<Scalar, DataPoint::Dim> |
The type used to store node bounding boxes.
Must provide diagonal()
, and center()
functions, all returning a DataPoint::VectorType
.
Definition at line 132 of file kdTreeTraits.h.
anonymous enum : std::size_t |
Enumerator | |
---|---|
MAX_COUNT | The maximum number of nodes that a kd-tree can have when using this node type. |
Definition at line 117 of file kdTreeTraits.h.
|
inline |
Configures the inner node information.
Called after set_is_leaf and configure_range during kd-tree construction.
Definition at line 167 of file kdTreeTraits.h.
|
inline |
Configures the range of the node in the sample index array of the kd-tree.
Called after set_is_leaf during kd-tree construction.
Definition at line 149 of file kdTreeTraits.h.
|
inlineprotected |
Definition at line 209 of file kdTreeTraits.h.
|
inlineprotected |
Definition at line 211 of file kdTreeTraits.h.
|
inlineprotected |
Definition at line 208 of file kdTreeTraits.h.
|
inlineprotected |
Definition at line 210 of file kdTreeTraits.h.
|
inline |
The index of the first child of the node in the node array of the kd-tree.
first_child_id + 1
). Definition at line 205 of file kdTreeTraits.h.
|
inline |
Which axis the split of the AABB of the inner node was done on.
Definition at line 196 of file kdTreeTraits.h.
|
inline |
The position of the AABB split of the inner node.
Definition at line 191 of file kdTreeTraits.h.
|
inline |
Definition at line 134 of file kdTreeTraits.h.
|
inline |
The size of the range of the leaf node in the sample index array.
Definition at line 186 of file kdTreeTraits.h.
|
inline |
The start index of the range of the leaf node in the sample index array.
Definition at line 181 of file kdTreeTraits.h.
|
inline |
Definition at line 135 of file kdTreeTraits.h.