Super4PCS Library  V1.1.2(719f5c0)
GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer > Class Template Reference

Multidimensional node used for intersection query. More...

+ Collaboration diagram for GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >:

Public Types

enum  { Dim = _dim }
 
typedef _PointContainer PointContainer
 
typedef _IdContainer IdContainer
 

Public Member Functions

 NdNode (const PointContainer &points, IdContainer &ids, const Point &p=Point::Zero(), unsigned int begin=0, unsigned int end=0)
 
 NdNode (const NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer > &other)
 
NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer > & operator= (const NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer > &rhs)
 
 ~NdNode ()
 
int rangeLength () const
 Length of the range covered by this node in the id array. More...
 
unsigned int rangeBegin () const
 First position in the id array defining the current instance range. More...
 
unsigned int rangeEnd () const
 Last position in the id array defining the current instance range. More...
 
const Point & pointInRange (unsigned int i) const
 Access to the i-eme point in the node. Range limits are NOT tested! More...
 
unsigned int idInRange (unsigned int i) const
 Access to the i-eme point in the node. Range limits are NOT tested! More...
 
const Point & center () const
 Center of the current node. More...
 
void split (std::vector< NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer > > &childs, Scalar rootEdgeHalfLength)
 Split the node and compute child nodes. More...
 

Static Public Member Functions

static NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer > buildUnitRootNode (const PointContainer &points, IdContainer &ids)
 

Detailed Description

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
class GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >

Multidimensional node used for intersection query.

Each instance store references to the data arrays:

  • const access to the input points
  • writing access to the dereferencing id array

The working dimension is deduced from the Point class

Member Typedef Documentation

◆ IdContainer

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
typedef _IdContainer GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::IdContainer

◆ PointContainer

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
typedef _PointContainer GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::PointContainer

Member Enumeration Documentation

◆ anonymous enum

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
anonymous enum
Enumerator
Dim 

Constructor & Destructor Documentation

◆ NdNode() [1/2]

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::NdNode ( const PointContainer points,
IdContainer ids,
const Point &  p = Point::Zero(),
unsigned int  begin = 0,
unsigned int  end = 0 
)
inline

◆ NdNode() [2/2]

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::NdNode ( const NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer > &  other)
inline

◆ ~NdNode()

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::~NdNode ( )
inline

Member Function Documentation

◆ buildUnitRootNode()

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
static NdNode<Point, _dim, Scalar, _PointContainer, _IdContainer> GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::buildUnitRootNode ( const PointContainer points,
IdContainer ids 
)
inlinestatic

◆ center()

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
const Point& GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::center ( ) const
inline

Center of the current node.

+ Here is the call graph for this function:

◆ idInRange()

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
unsigned int GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::idInRange ( unsigned int  i) const
inline

Access to the i-eme point in the node. Range limits are NOT tested!

◆ operator=()

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
NdNode<Point, _dim, Scalar, _PointContainer, _IdContainer>& GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::operator= ( const NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer > &  rhs)
inline

◆ pointInRange()

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
const Point& GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::pointInRange ( unsigned int  i) const
inline

Access to the i-eme point in the node. Range limits are NOT tested!

◆ rangeBegin()

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
unsigned int GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::rangeBegin ( ) const
inline

First position in the id array defining the current instance range.

◆ rangeEnd()

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
unsigned int GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::rangeEnd ( ) const
inline

Last position in the id array defining the current instance range.

◆ rangeLength()

template<class Point, int _dim, typename Scalar, class _PointContainer = std::vector<Point>, class _IdContainer = std::vector<unsigned int>>
int GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::rangeLength ( ) const
inline

Length of the range covered by this node in the id array.

◆ split()

template<class Point , int _dim, typename Scalar , class _PointContainer , class _IdContainer >
void GlobalRegistration::Accelerators::PairExtraction::NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer >::split ( std::vector< NdNode< Point, _dim, Scalar, _PointContainer, _IdContainer > > &  childs,
Scalar  rootEdgeHalfLength 
)

Split the node and compute child nodes.

Split the current node in 2^Dim childs using a regular grid.

Note
Childs are not stored

The IdContainer is updated to partially sort the input ids wrt to the childs range limits.

Parameters
ChildContainerin:
+ Here is the call graph for this function: