PCL
pcl::QuadTree< T >::LeafNode Class Reference

Quadtree leaf node structure. More...

#include <QuadTree.h>

+ Inheritance diagram for pcl::QuadTree< T >::LeafNode:

Public Member Functions

 LeafNode (const rectangle &r, const point &p)
 
 LeafNode (const rectangle &r, const point_list &p)
 
int Length () const
 
- Public Member Functions inherited from pcl::QuadTree< T >::Node
 Node ()=default
 
 Node (const rectangle &r)
 
bool Includes (const rectangle::point &p) const
 
bool Includes (coordinate x, coordinate y) const
 
bool Intersects (const rectangle &r) const
 
bool IsLeaf () const
 
rectangle NERect () const
 
rectangle NWRect () const
 
rectangle SERect () const
 
rectangle SWRect () const
 

Public Attributes

void * data = nullptr
 
point_list points
 
- Public Attributes inherited from pcl::QuadTree< T >::Node
Nodene = nullptr
 North-East child node, representing the top-right subregion.
 
Nodenw = nullptr
 North-West child node, representing the top-left subregion.
 
rectangle rect = 0.0
 The rectangular region represented by this node.
 
Nodese = nullptr
 South-East child node, representing the bottom-right subregion.
 
Nodesw = nullptr
 South-West child node, representing the bottom-left subregion.
 

Detailed Description

template<class T>
class pcl::QuadTree< T >::LeafNode

Definition at line 266 of file QuadTree.h.

Constructor & Destructor Documentation

◆ LeafNode() [1/2]

template<class T >
pcl::QuadTree< T >::LeafNode::LeafNode ( const rectangle r,
const point_list p 
)
inline

Constructs a new leaf node representing the specified rectangular region r and storing a nonempty point list p.

Definition at line 295 of file QuadTree.h.

References pcl::Array< T, A >::IsEmpty(), and pcl::QuadTree< T >::LeafNode::points.

◆ LeafNode() [2/2]

template<class T >
pcl::QuadTree< T >::LeafNode::LeafNode ( const rectangle r,
const point p 
)
inline

Constructs a new leaf node representing the specified rectangular region r and storing the specified point p.

Definition at line 306 of file QuadTree.h.

References pcl::QuadTree< T >::LeafNode::points.

Member Function Documentation

◆ Length()

template<class T >
int pcl::QuadTree< T >::LeafNode::Length ( ) const
inline

Returns the number of points contained by this leaf node. Under normal conditions, the returned value must be > 0.

Definition at line 316 of file QuadTree.h.

References pcl::Array< T, A >::Length(), and pcl::QuadTree< T >::LeafNode::points.

Member Data Documentation

◆ data

template<class T >
void* pcl::QuadTree< T >::LeafNode::data = nullptr

Pointer to an arbitrary data structure that can be associated with this leaf node. Its default value is nullptr.

The quadtree structure does not access this pointer in any way. Destruction of the object pointed to by this member, if required, is the sole responsibility of the external code that has defined it.

Definition at line 287 of file QuadTree.h.

◆ points

template<class T >
point_list pcl::QuadTree< T >::LeafNode::points

The list of points contained by this leaf node.

In a healthy quadtree (as any QuadTree structure should be under normal working conditions), every existing leaf node should contain a nonempty point list.

Definition at line 275 of file QuadTree.h.

Referenced by pcl::QuadTree< T >::LeafNode::LeafNode(), and pcl::QuadTree< T >::LeafNode::Length().


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