pcl::recognition::BVH< UserData >::Node Class Reference

`#include <pcl/recognition/ransac_based/bvh.h>`

## Public Member Functions

| Node (std::vector< BoundedObject *> &sorted_objects, int first_id, int last_id)
| 'sorted_objects' is a sorted vector of bounded objects. More...
virtual | ~Node ()
bool | hasChildren () const
Node * | getLeftChild ()
Node * | getRightChild ()
BoundedObject * | getObject ()
bool | isLeaf () const
bool | intersect (const float box[6]) const
| Returns true if 'box' intersects or touches (with a side or a vertex) this node. More...
double | computeBoundingBoxVolume () const
| Computes and returns the volume of the bounding box of this node. More...

## Protected Attributes

float | bounds_ [6]
Node * | children_ [2]
BoundedObject * | object_

## Friends

class | BVH

## Detailed Description

### template<class UserData>
class pcl::recognition::BVH< UserData >::Node

Definition at line 122 of file bvh.h.

## Constructor & Destructor Documentation

## Node()

template<class UserData >

pcl::recognition::BVH< UserData >::Node::Node | ( | std::vector< BoundedObject *> & | sorted_objects,
|  | int | first_id,
|  | int | last_id
| ) |  |

inline

'sorted_objects' is a sorted vector of bounded objects.

It has to be sorted in ascending order according to the objects' x-coordinates. The constructor recursively calls itself with the right 'first_id' and 'last_id' and with the same vector 'sorted_objects'.

Definition at line 128 of file bvh.h.

References pcl::recognition::aux::expandBoundingBox().

## ~Node()

template<class UserData >

virtual pcl::recognition::BVH< UserData >::Node::~Node | ( |  | ) |

inline virtual

Definition at line 153 of file bvh.h.

## Member Function Documentation

## computeBoundingBoxVolume()

template<class UserData >

double pcl::recognition::BVH< UserData >::Node::computeBoundingBoxVolume | ( |  | ) | const

inline

Computes and returns the volume of the bounding box of this node.

Definition at line 205 of file bvh.h.

## getLeftChild()

template<class UserData >

Node* pcl::recognition::BVH< UserData >::Node::getLeftChild | ( |  | ) |

inline

Definition at line 169 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

## getObject()

template<class UserData >

BoundedObject* pcl::recognition::BVH< UserData >::Node::getObject | ( |  | ) |

inline

Definition at line 181 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

## getRightChild()

template<class UserData >

Node* pcl::recognition::BVH< UserData >::Node::getRightChild | ( |  | ) |

inline

Definition at line 175 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

## hasChildren()

template<class UserData >

bool pcl::recognition::BVH< UserData >::Node::hasChildren | ( |  | ) | const

inline

Definition at line 163 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

## intersect()

template<class UserData >

bool pcl::recognition::BVH< UserData >::Node::intersect | ( | const float | box[6] | ) | const

inline

Returns true if 'box' intersects or touches (with a side or a vertex) this node.

Definition at line 194 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

## isLeaf()

template<class UserData >

bool pcl::recognition::BVH< UserData >::Node::isLeaf | ( |  | ) | const

inline

Definition at line 187 of file bvh.h.

## Friends And Related Function Documentation

## BVH

template<class UserData >

friend class BVH

friend

Definition at line 210 of file bvh.h.

## Member Data Documentation

## bounds_

template<class UserData >

float pcl::recognition::BVH< UserData >::Node::bounds_[6]

protected

Definition at line 213 of file bvh.h.

## children_

template<class UserData >

Node* pcl::recognition::BVH< UserData >::Node::children_[2]

protected

Definition at line 214 of file bvh.h.

## object_

template<class UserData >

BoundedObject* pcl::recognition::BVH< UserData >::Node::object_

protected

Definition at line 215 of file bvh.h.

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

- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/recognition/include/pcl/recognition/ransac_based/bvh.h