Blender V5.3
blender::TreeBuilder< T > Class Template Reference

Public Types

using value_type = typename T::base_type

Public Member Functions

 TreeBuilder (const Span< T > points, const MutableSpan< int > indices, const int leaf_size, LinearAllocator<> &allocator)
Node * build (const Span< int > indices, Bounds< T > &r_bounds)

Static Public Member Functions

static int node_batch_size (const int points_num, const int leaf_size)

Static Public Attributes

static constexpr int dimensions = T::type_length

Detailed Description

template<typename T>
class blender::TreeBuilder< T >

Definition at line 91 of file kdtree.cc.

Member Typedef Documentation

◆ value_type

template<typename T>
using blender::TreeBuilder< T >::value_type = typename T::base_type

Definition at line 93 of file kdtree.cc.

Constructor & Destructor Documentation

◆ TreeBuilder()

template<typename T>
blender::TreeBuilder< T >::TreeBuilder ( const Span< T > points,
const MutableSpan< int > indices,
const int leaf_size,
LinearAllocator<> & allocator )
inline

Definition at line 183 of file kdtree.cc.

Member Function Documentation

◆ build()

template<typename T>
Node * blender::TreeBuilder< T >::build ( const Span< int > indices,
Bounds< T > & r_bounds )
inline

◆ node_batch_size()

template<typename T>
int blender::TreeBuilder< T >::node_batch_size ( const int points_num,
const int leaf_size )
inlinestatic

The approximate number of nodes a tree with points_num points takes. Leaves hold a bit over two thirds of #leaf_size_ points on average, and a tree has one interior node fewer than it has leaves. Measured at 22.6 points per leaf for a leaf size of 32. See BLI_kdtree_performance_test.

Definition at line 152 of file kdtree.cc.

Member Data Documentation

◆ dimensions

template<typename T>
int blender::TreeBuilder< T >::dimensions = T::type_length
staticconstexpr

Definition at line 94 of file kdtree.cc.


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