Loading...
Searching...
No Matches
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.
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.
double | computeBoundingBoxVolume () const
| Computes and returns the volume of the bounding box of this node.

## 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 119 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 125 of file bvh.h.

References bounds_, children_, pcl::recognition::aux::expandBoundingBox(), Node(), and object_.

Referenced by Node().

## ~Node()

template<class UserData>

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

inline virtual

Definition at line 153 of file bvh.h.

References children_.

## 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 199 of file bvh.h.

References bounds_.

## getLeftChild()

template<class UserData>

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

inline

Definition at line 166 of file bvh.h.

References children_.

## getObject()

template<class UserData>

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

inline

Definition at line 178 of file bvh.h.

References object_.

## getRightChild()

template<class UserData>

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

inline

Definition at line 172 of file bvh.h.

References children_.

## hasChildren()

template<class UserData>

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

inline

Definition at line 160 of file bvh.h.

References children_.

## 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 191 of file bvh.h.

References bounds_.

## isLeaf()

template<class UserData>

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

inline

Definition at line 184 of file bvh.h.

References children_.

## Friends And Related Symbol Documentation

## BVH

template<class UserData>

friend class BVH

friend

Definition at line 204 of file bvh.h.

References BVH.

Referenced by BVH.

## Member Data Documentation

## bounds_

template<class UserData>

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

protected

Definition at line 207 of file bvh.h.

Referenced by computeBoundingBoxVolume(), intersect(), and Node().

## children_

template<class UserData>

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

protected

Definition at line 208 of file bvh.h.

Referenced by getLeftChild(), getRightChild(), hasChildren(), isLeaf(), Node(), and ~Node().

## object_

template<class UserData>

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

protected

Definition at line 209 of file bvh.h.

Referenced by getObject(), and Node().

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

- pcl/recognition/ransac_based/bvh.h