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

Quadtree node structure. More...

#include <QuadTree.h>

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

Public Member Functions

 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

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 >::Node

Definition at line 158 of file QuadTree.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

template<class T >
pcl::QuadTree< T >::Node::Node ( )
default

Default constructor. Constructs an uninitialized quadtree node.

◆ Node() [2/2]

template<class T >
pcl::QuadTree< T >::Node::Node ( const rectangle r)
inline

Constructs a quadtree node for the specified rectangular region r.

Definition at line 178 of file QuadTree.h.

Member Function Documentation

◆ Includes() [1/2]

template<class T >
bool pcl::QuadTree< T >::Node::Includes ( const rectangle::point p) const
inline

Returns true iff the rectangular region represented by this node includes the specified point p in the plane.

Definition at line 221 of file QuadTree.h.

References pcl::QuadTree< T >::Node::Includes(), pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ Includes() [2/2]

template<class T >
bool pcl::QuadTree< T >::Node::Includes ( coordinate  x,
coordinate  y 
) const
inline

Returns true iff the rectangular region represented by this node includes a point in the plane specified by its coordinates x, y.

Definition at line 211 of file QuadTree.h.

References pcl::QuadTree< T >::Node::rect, pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

Referenced by pcl::QuadTree< T >::Node::Includes().

◆ Intersects()

template<class T >
bool pcl::QuadTree< T >::Node::Intersects ( const rectangle r) const
inline

Returns true iff the rectangular region represented by this node intersects the specified rectangle r.

Definition at line 201 of file QuadTree.h.

References pcl::QuadTree< T >::Node::rect, pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ IsLeaf()

template<class T >
bool pcl::QuadTree< T >::Node::IsLeaf ( ) const
inline

Returns true iff this is a leaf quadtree node. A leaf node does not contain child nodes, that is, there is no further subdivision of the domain space beyond a leaf quadtree node.

In a healthy quadtree (as any QuadTree structure should be under normal working conditions), you can expect any leaf node to be an instance of QuadTree::LeafNode containing a nonempty list of points.

Definition at line 192 of file QuadTree.h.

References pcl::QuadTree< T >::Node::ne, pcl::QuadTree< T >::Node::nw, pcl::QuadTree< T >::Node::se, and pcl::QuadTree< T >::Node::sw.

◆ NERect()

template<class T >
rectangle pcl::QuadTree< T >::Node::NERect ( ) const
inline

Returns the Northeast (top right) splitting rectangle for this node.

Definition at line 237 of file QuadTree.h.

References pcl::GenericRectangle< T >::CenterRight(), pcl::GenericRectangle< T >::CenterTop(), and pcl::QuadTree< T >::Node::rect.

◆ NWRect()

template<class T >
rectangle pcl::QuadTree< T >::Node::NWRect ( ) const
inline

Returns the Northwest (top left) splitting rectangle for this node.

Definition at line 229 of file QuadTree.h.

References pcl::GenericRectangle< T >::Center(), pcl::QuadTree< T >::Node::rect, and pcl::GenericRectangle< T >::TopLeft().

◆ SERect()

template<class T >
rectangle pcl::QuadTree< T >::Node::SERect ( ) const
inline

Returns the Southeast (bottom right) splitting rectangle for this node.

Definition at line 254 of file QuadTree.h.

References pcl::GenericRectangle< T >::BottomRight(), pcl::GenericRectangle< T >::Center(), and pcl::QuadTree< T >::Node::rect.

◆ SWRect()

template<class T >
rectangle pcl::QuadTree< T >::Node::SWRect ( ) const
inline

Returns the Southwest (bottom left) splitting rectangle for this node.

Definition at line 245 of file QuadTree.h.

References pcl::GenericRectangle< T >::CenterBottom(), pcl::GenericRectangle< T >::CenterLeft(), and pcl::QuadTree< T >::Node::rect.


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