Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Member Functions | Protected Attributes | Friends
pcl::recognition::BVH< UserData >::Node Class Reference

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

+ Collaboration diagram for pcl::recognition::BVH< UserData >::Node:

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
 
NodegetLeftChild ()
 
NodegetRightChild ()
 
BoundedObjectgetObject ()
 
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]
 
Nodechildren_ [2]
 
BoundedObjectobject_
 

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 pcl::recognition::aux::expandBoundingBox().

◆ ~Node()

template<class UserData >
virtual pcl::recognition::BVH< UserData >::Node::~Node ( )
inlinevirtual

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

◆ getLeftChild()

template<class UserData >
Node* pcl::recognition::BVH< UserData >::Node::getLeftChild ( )
inline

Definition at line 166 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 178 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 172 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 160 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 191 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 184 of file bvh.h.

Friends And Related Function Documentation

◆ BVH

template<class UserData >
friend class BVH
friend

Definition at line 204 of file bvh.h.

Member Data Documentation

◆ bounds_

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

Definition at line 207 of file bvh.h.

◆ children_

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

Definition at line 208 of file bvh.h.

◆ object_

template<class UserData >
BoundedObject* pcl::recognition::BVH< UserData >::Node::object_
protected

Definition at line 209 of file bvh.h.


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