Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
Octree_< T, dim > Class Template Reference

#include <octree.h>

Classes

struct  BoundingBox
 

Public Types

using Data = typename DP::Index
 
using DataContainer = std::vector< Data >
 
using DP = typename PM::DataPoints
 
using Id = typename DP::Index
 
using PM = PointMatcher< T >
 
using Point = Eigen::Matrix< T, dim, 1 >
 

Public Member Functions

bool build (const DP &pts, size_t maxDataByNode=1, T maxSizeByNode=T(0.), bool parallelBuild=false)
 
Point getCenter () const
 
DataContainergetData ()
 
std::size_t getDepth () const
 
getRadius () const
 
std::size_t idx (const Point &pt) const
 
std::size_t idx (const DP &pts, const Data d) const
 
bool isEmpty () const
 
bool isLeaf () const
 
bool isRoot () const
 
 Octree_ ()
 
 Octree_ (const Octree_< T, dim > &o)
 
 Octree_ (Octree_< T, dim > &&o)
 
Octree_< T, dim > & operator= (const Octree_< T, dim > &o)
 
Octree_< T, dim > & operator= (Octree_< T, dim > &&o)
 
Octree_< T, dim > * operator[] (std::size_t idx)
 
template<typename Callback >
bool visit (Callback &cb)
 
virtual ~Octree_ ()
 

Static Public Attributes

static constexpr std::size_t nbCells = PointMatcherSupport::pow(2, dim)
 

Protected Member Functions

bool build (const DP &pts, DataContainer &&datas, BoundingBox &&bb, size_t maxDataByNode=1, T maxSizeByNode=T(0.), bool parallelBuild=false)
 
DataContainer toData (const DP &pts, const std::vector< Id > &ids)
 

Private Attributes

BoundingBox bb
 
Octree_cells [nbCells]
 
DataContainer data
 
std::size_t depth
 
Octree_parent
 

Detailed Description

template<typename T, std::size_t dim>
class Octree_< T, dim >

Definition at line 78 of file octree.h.

Member Typedef Documentation

◆ Data

template<typename T, std::size_t dim>
using Octree_< T, dim >::Data = typename DP::Index

Definition at line 85 of file octree.h.

◆ DataContainer

template<typename T, std::size_t dim>
using Octree_< T, dim >::DataContainer = std::vector<Data>

Definition at line 86 of file octree.h.

◆ DP

template<typename T, std::size_t dim>
using Octree_< T, dim >::DP = typename PM::DataPoints

Definition at line 82 of file octree.h.

◆ Id

template<typename T, std::size_t dim>
using Octree_< T, dim >::Id = typename DP::Index

Definition at line 83 of file octree.h.

◆ PM

template<typename T, std::size_t dim>
using Octree_< T, dim >::PM = PointMatcher<T>

Definition at line 81 of file octree.h.

◆ Point

template<typename T, std::size_t dim>
using Octree_< T, dim >::Point = Eigen::Matrix<T,dim,1>

Definition at line 88 of file octree.h.

Constructor & Destructor Documentation

◆ Octree_() [1/3]

template<typename T , std::size_t dim>
Octree_< T, dim >::Octree_ ( )

Definition at line 42 of file octree.hpp.

◆ Octree_() [2/3]

template<typename T, std::size_t dim>
Octree_< T, dim >::Octree_ ( const Octree_< T, dim > &  o)

Definition at line 48 of file octree.hpp.

◆ Octree_() [3/3]

template<typename T, std::size_t dim>
Octree_< T, dim >::Octree_ ( Octree_< T, dim > &&  o)

Definition at line 74 of file octree.hpp.

◆ ~Octree_()

template<typename T , std::size_t dim>
Octree_< T, dim >::~Octree_ ( )
virtual

Definition at line 97 of file octree.hpp.

Member Function Documentation

◆ build() [1/2]

template<typename T, std::size_t dim>
bool Octree_< T, dim >::build ( const DP pts,
size_t  maxDataByNode = 1,
maxSizeByNode = T(0.),
bool  parallelBuild = false 
)

Definition at line 231 of file octree.hpp.

◆ build() [2/2]

template<typename T, std::size_t dim>
bool Octree_< T, dim >::build ( const DP pts,
DataContainer &&  datas,
BoundingBox &&  bb,
size_t  maxDataByNode = 1,
maxSizeByNode = T(0.),
bool  parallelBuild = false 
)
protected

Definition at line 304 of file octree.hpp.

◆ getCenter()

template<typename T , std::size_t dim>
Octree_< T, dim >::Point Octree_< T, dim >::getCenter ( ) const

Definition at line 207 of file octree.hpp.

◆ getData()

template<typename T , std::size_t dim>
Octree_< T, dim >::DataContainer * Octree_< T, dim >::getData ( )

Definition at line 212 of file octree.hpp.

◆ getDepth()

template<typename T , std::size_t dim>
size_t Octree_< T, dim >::getDepth ( ) const

Definition at line 197 of file octree.hpp.

◆ getRadius()

template<typename T , std::size_t dim>
T Octree_< T, dim >::getRadius ( ) const

Definition at line 202 of file octree.hpp.

◆ idx() [1/2]

template<typename T , std::size_t dim>
size_t Octree_< T, dim >::idx ( const Point pt) const
inline

Definition at line 181 of file octree.hpp.

◆ idx() [2/2]

template<typename T , std::size_t dim>
size_t Octree_< T, dim >::idx ( const DP pts,
const Data  d 
) const
inline

Definition at line 192 of file octree.hpp.

◆ isEmpty()

template<typename T , std::size_t dim>
bool Octree_< T, dim >::isEmpty ( ) const

Definition at line 176 of file octree.hpp.

◆ isLeaf()

template<typename T , std::size_t dim>
bool Octree_< T, dim >::isLeaf ( ) const

Definition at line 166 of file octree.hpp.

◆ isRoot()

template<typename T , std::size_t dim>
bool Octree_< T, dim >::isRoot ( ) const

Definition at line 171 of file octree.hpp.

◆ operator=() [1/2]

template<typename T, std::size_t dim>
Octree_< T, dim > & Octree_< T, dim >::operator= ( const Octree_< T, dim > &  o)

Definition at line 106 of file octree.hpp.

◆ operator=() [2/2]

template<typename T, std::size_t dim>
Octree_< T, dim > & Octree_< T, dim >::operator= ( Octree_< T, dim > &&  o)

Definition at line 135 of file octree.hpp.

◆ operator[]()

template<typename T, std::size_t dim>
Octree_< T, dim > * Octree_< T, dim >::operator[] ( std::size_t  idx)

Definition at line 217 of file octree.hpp.

◆ toData()

template<typename T , std::size_t dim>
Octree_< T, dim >::DataContainer Octree_< T, dim >::toData ( const DP pts,
const std::vector< Id > &  ids 
)
inlineprotected

Definition at line 224 of file octree.hpp.

◆ visit()

template<typename T , std::size_t dim>
template<typename Callback >
bool Octree_< T, dim >::visit ( Callback &  cb)

Definition at line 373 of file octree.hpp.

Member Data Documentation

◆ bb

template<typename T, std::size_t dim>
BoundingBox Octree_< T, dim >::bb
private

Definition at line 116 of file octree.h.

◆ cells

template<typename T, std::size_t dim>
Octree_* Octree_< T, dim >::cells[nbCells]
private

Definition at line 101 of file octree.h.

◆ data

template<typename T, std::size_t dim>
DataContainer Octree_< T, dim >::data
private

Definition at line 118 of file octree.h.

◆ depth

template<typename T, std::size_t dim>
std::size_t Octree_< T, dim >::depth
private

Definition at line 120 of file octree.h.

◆ nbCells

template<typename T, std::size_t dim>
constexpr std::size_t Octree_< T, dim >::nbCells = PointMatcherSupport::pow(2, dim)
static

Definition at line 91 of file octree.h.

◆ parent

template<typename T, std::size_t dim>
Octree_* Octree_< T, dim >::parent
private

Definition at line 100 of file octree.h.


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


libpointmatcher
Author(s):
autogenerated on Sat May 27 2023 02:38:03